5 Replies Latest reply: Mar 11, 2011 1:21 PM by Nancy O. RSS

    Commenting Out Library Code

    Shan-Dysigns Community Member

      When a Library item is inserted into an html document, it automatically adds some commenting out code

       

      <!-- #BeginLibraryItem "/Library/footer.lbi" -->

       

      <!-- #EndLibraryItem -->

       

      but still appears in Design View (which is expected). There are times when I don't want the actual Library item (a footer in this case) to be visible in Design View, and simply applying an html comment doesn't work (I assume because you are basically trying to double comment the code). So the question is: is there another way to temporarily hide a library item from appearing in Design View? The reason I'm asking this (and maybe there is another underlying issue) is because looking in Design View, the footer appears in the middle of hte page, but renders properly when previewing in either Live Mode or previewing in browser.

       

      Design View: the red outline shows where the library item (footer) appears - in the middle of the design view area - worth noting, I work in Split view (with code on top, preview on bottom), so maybe that has something to do with not rendering items properly on screen?

       

      footer-design-view.jpg

       

      Live View or Browser Preview:

      footer-browser-view.jpg

       

      I don't know if this is happening because of CSS styles of possibly some html code or maybe even an underlying issue somewhere else. This is more irritating than anything else. Does anyone have a clue what might be going on?

       

      To add: the only way I am currently able to temporarily hide the footer library item is to open the library item, comment out that code, then update all pages (which is a pain for when I need to go back and forth)...

        • 1. Re: Commenting Out Library Code
          Nancy O. CommunityMVP

          If you post a link, you'll get better help.  I'm guessing you're positioning the footer with absolute or fixed positioning which is causing DW Design View to hiccup.  How does it look in Live View?

           

          I don't think it's possible to comment out a library item (or any other DW proprietary code).

          Another reason to use Server-Side Includes.

           

           

          Nancy O.
          Alt-Web Design & Publishing
          Web | Graphics | Print | Media  Specialists 
          http://alt-web.com/
          http://twitter.com/altweb

          • 2. Re: Commenting Out Library Code
            Shan-Dysigns Community Member
            If you post a link, you'll get better help.

            My original reason for the post was about the Library code and commenting it out. The footer issue was really just a secondary issue. The page in Live View looks the same as in the browser view (example above). This is why I thought something in Design View must be unhappy because the page looks as it should outside of DV.

             

            I figured out the issue from the last post of mine you had replied to http://forums.adobe.com/message/3516699#3516699

             

            I had closed a div tag too early (it was inside another div which was keeping it from expanding to the min-height pf 100%). I'm not sure why you hate rollover images so much and point that to saving people usage space for IF they are viewing the page on a mobile device. I'm not including people on mobile devices as part of the targeted demographic for this website (at least not at this stage in development). I looked at your css idea for menus, but I quickly noticed it wasn't IE compatible. I'm in the same boat of other designers who can't wait until IE9 comes out because as of now, IE < version 9 is just horrid! I looked at the IE equivalent for those filters, and IE's version of the Glow is also horrid. So, for reasons I explained in the previous post, I pretty much need to stick with the messy techniques I've started and make them work.

             

            If this helps, I've uploaded what I think is enough to see what I'm facing.

             

            http://shan-dysigns.com/userForums/dreamweaver/atws/

            • 3. Re: Commenting Out Library Code
              Shan-Dysigns Community Member
              Another reason to use Server-Side Includes.

              As much as one may know about the software they possess, there are times in which features are simply overlooked. I tried this out, and I can't imagine anyone actually using Library items now. I wish I knew more about DW than I do - I'm deep into Photoshop and the like - DW is still a learning experience in certain areas.

               

              Seeing the results of SSI (without having to upload to a server) either resort to Live View (which I would imagine has some limitations in general), and setting up a testing server. I read up on testing servers, and I see XAMP seems to be the software to use. I imagine that's one of many, but what's your experience with testing servers - meaning, is this the proper software - any others to include in the choice? Being self-taught has its limitations too ya know...

              • 4. Re: Commenting Out Library Code
                John Waller CommunityMVP

                Definitely use a testing server to speed up dynamic web development.

                 

                XAMPP or WAMP are the two most popular all-in-one (Apache, MySql, PHP) options for Windows.

                • 5. Re: Commenting Out Library Code
                  Nancy O. CommunityMVP

                  If this helps, I've uploaded what I think is enough to see what I'm facing.

                   

                  As an FYI, your page content falls out of the box when end-users increase default text-size in their browsers (Firefox, View >  Zoom > Zoom Text Only), hit Ctrl+++.

                   

                  See screenshot below where I've highlighted dark text on dark background to be visible:

                   

                  woodSpin.png

                   

                  Height: value in pixels is a restriction in all browsers except IE.  If needed to reveal a background image, use values in ems or the min-height property with Conditional Comments for pre-IE7 browsers.

                   

                  CSS:

                   

                  #homeContent {
                      position: relative;
                      width: 892px;
                     min-height:400px;

                  }

                   

                  Conditional Comment:

                   

                  <!--[if lt IE 7]>
                  <style type="text/css">
                  #homeContent {
                  height: 25em
                  }
                  </style>
                  <![endif]-->
                  

                   

                   

                  Nancy O.
                  Alt-Web Design & Publishing
                  Web | Graphics | Print | Media  Specialists 
                  http://alt-web.com/
                  http://twitter.com/altweb