Announcement

Collapse
No announcement yet.

Commenting Layout Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Commenting Layout Code

    Is there a way to add comments to the layout code that will not become part of the generated html?

    #2
    Found it - obvious really:

    /* Comment */

    Comment


      #3
      alternatively

      Code:
      <!--
             -->

      Comment


        #4
        Originally posted by completerookie
        alternatively

        Code:
        <!--
               -->
        Errm - no.

        The reason Duncan posted is because comments with the <!-- style markers are passed through and show up in the online html.

        Thus the search for a comment marker that will cause Actinic to remove the comment from the final result. Thanks for that Duncan - useful to know.
        Bill
        www.egyptianwonders.co.uk
        Text directoryWorldwide Actinic(TM) shops
        BC Ness Solutions Support services, custom software
        Registered Microsoft™ Partner (ISV)
        VoIP UK: 0131 208 0605
        Located: Alexandria, EGYPT

        Comment


          #5
          Actually I've just been testing this. I saw in outer layout for the contemporary theme that Actinic had placed a /* comment */ in the layout code but I haven't been able to get it to work anywhere else.

          I also see that <!-- comment --> doesn't always pass through.

          Will do more testing and see what's what with this. I hope there is a consistant method as I would like to comment my code changes.

          Comment


            #6
            It would appear that /* comment */ only works outside of the BODY but <!-- comment --> works inside the BODY. I haven't seen the comment passed through to the produced code unless the code is uncompressed.

            Comment


              #7
              I'm working on a v7 to v8 upgrade (not a rewrite - the owner wants to do that later with a new design) and am getting some comments using <!-- passing through to the test site - things like v7 template names and specify additional html for beginning of x here. I will be trying /* comment markers just for fun before I finish deleting all of those comments.
              Bill
              www.egyptianwonders.co.uk
              Text directoryWorldwide Actinic(TM) shops
              BC Ness Solutions Support services, custom software
              Registered Microsoft™ Partner (ISV)
              VoIP UK: 0131 208 0605
              Located: Alexandria, EGYPT

              Comment


                #8
                I also see that <!-- comment --> doesn't always pass through.
                my understanding is all comments are not uploaded when using "compact HTML"

                Comment


                  #9
                  It seems that <!-- whatever --> now get passed through to the generated pages, regardless of the Compact HTML/CGI (which doesn't seem to do much anymore).

                  This is probably why the Layouts use so few comments.

                  You could use a kludge like

                  <actinic:block if="1 == 2">
                  Long multiline comment here
                  </actinic:block>
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    I have tried adding the standard html comment <!-- whatever --> in different places in layouts and in different layouts and then searched the created html - in all the cases I tried the comment never appeared in the resultant html when compacted. It did appear when not compacted. (in fact lots of block conditioned code is visble inside commented markers when the code is uncompacted - which surprised me as I thought this would not have made it into the html at all)

                    It seems to be dependant on something else as in some instances it is reported as being passed through in others not. Odd.

                    Comment


                      #11
                      I have a customVar (declared at just about every level) called Debug - its defaulting to "0" and inherited from "parent" and then I have to two conditions DebugOn and DebugOff
                      the top level
                      these allow me to put anything I like either written to the screen or generating comments
                      to force comments throught I use
                      Code:
                      window.write ("\<!--")
                      etc - this always forces the values to be shown regardless of compaction.
                      Anywhere I need DebugOn, I can just set my customVar=1 and it works - I don't need to remove it later, just re-set the value to 0
                      I can always turn debug on or off at SITE-LEVEL and show all debug issues, alternatively set it at product, brochure, option level in the same way.

                      perhaps its a concept that Actinic can adopt and issue a standard set of conditions for this sort of use.

                      Comment


                        #12
                        Whoops.

                        I said that <!-- whatever --> always gets passed through, regardless of the CompactHTML/CGI option.

                        Now I see that it does on Previews but not on Uploads.

                        The exception seems to be that anything within <script..> . . . </script> still shows the comments (as it should).
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment

                        Working...
                        X