13 Replies Latest reply on Jan 26, 2009 8:00 AM by Newsgroup_User

    hrefs in library

    galvestongirl
      Can someone PLEASE help me get around the problem of linking to hrefs that are in the library. I've seen this query posted previously, but haven't seen a workable solution. The problem, as is known, is that when you click on the link, the browser looks for the html file in the library.

      I've added my links (and there will be dozens and dozens) to the library because I will be constantly adding new pages to my site, and being able to do a one-time change was the main reasons for using Dreamweaver.

      There must be a solution, right? that a newbie can understand??? I've look at the Spry Widget and at something called SSI, they seem awfully involved. Yikes! Thanks for some expert advice. Galvestongirl
        • 1. Re: hrefs in library
          Level 7
          > There must be a solution, right? that a newbie can understand???

          Yes - it's posted every time. The solution begins like this -

          1. Show us your code, please.
          2. Tell us what OS you are using and which DW version, please.

          Something you are doing is causing DW to think that the files to which you
          are linking are actually IN the Library folder. We can begin to diagnose
          this by looking at your code.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "galvestongirl" <webforumsuser@macromedia.com> wrote in message
          news:glji8d$qrv$1@forums.macromedia.com...
          > Can someone PLEASE help me get around the problem of linking to hrefs that
          > are
          > in the library. I've seen this query posted previously, but haven't seen
          > a
          > workable solution. The problem, as is known, is that when you click on
          > the
          > link, the browser looks for the html file in the library.
          >
          > I've added my links (and there will be dozens and dozens) to the library
          > because I will be constantly adding new pages to my site, and being able
          > to do
          > a one-time change was the main reasons for using Dreamweaver.
          >
          > There must be a solution, right? that a newbie can understand??? I've look
          > at
          > the Spry Widget and at something called SSI, they seem awfully involved.
          > Yikes! Thanks for some expert advice. Galvestongirl
          >

          • 2. Re: hrefs in library
            galvestongirl Level 1
            Here is my visitlist.lbi :
            Below are links to some of my other pages. Feel free to contact me with questions, comments or suggestions.
            In the US: Alaska | Blue Ridge Parkway | Boston | Gulf Shores, AL | Juliette, AL | Kure Beach, NC | New York City | Outer Banks, NC | Savannah | Shenandoah Valley | Texas Hill Country | Tybee Island, GA ....


            Here's my code:
            <div class="visitlist" id="apDiv28"><!-- #BeginLibraryItem "/Library/visitlist.lbi" -->
            <style type="text/css">
            <!--
            .style3 {
            color: #999999;
            font-style: italic;
            }
            .style2 {font-size: xx-small}
            -->
            </style>
            <title>visitlist</title>
            <p class="style3">Below are links to some of my other pages. Feel free to <a href="mailto:cneuwiller@gmail.com">contact me</a> with questions, comments or suggestions. </p>
            <p class="style3">In the US: Alaska | Blue Ridge Parkway | <a href="Library/Boston.html">Boston </a>| Gulf Shores, AL | <a href="Library/Juliette.html">Juliette, AL</a> | <a href="Library/KureBeach.html">Kure Beach, NC</a> | New York City | Outer Banks, NC | Savannah | Shenandoah Valley | Texas Hill Country | Tybee Island, GA</p>
            <p class="style3"> </p>
            <p class="style3"> </p>
            <p class="style3">In Europe: France | Germany | Greece | the Netherlands | Scotland | Switzerland </p>
            <p class="style3"> </p>
            <p class="style3">Other: my favorite photos | Vilseck DODDS teachers reunions</p>
            <p class="style3"> </p>
            <p class="style2"><span class="style2"></span>All images within 'The Wandering Chick' Web site are copyright protected. They may not be downloaded or otherwise copied. All rights reserved. My email address is listed above.</p>
            <!-- #EndLibraryItem --></div>
            </body>
            </html>


            I'm using Dreamweaver CS3 on Windows Vista.

            Thanks for your response. Hope you can help me.
            • 3. Re: hrefs in library
              Level 7
              > <div class="visitlist" id="apDiv28"><!-- #BeginLibraryItem
              > "/Library/visitlist.lbi" -->
              > <style type="text/css">

              It's not a good idea to have CSS in a Library item. Although some browsers
              may support this, I'm pretty sure not all do. This CSS should be in the
              external stylesheet or in the head of the parent page BEFORE inserting the
              Library item.

              > <a href="Library/Boston.html">

              How did you make this link in the Library item? Did you manually enter it,
              or did you use the browse icon on the Property inspector? Or, was the link
              in the parent page at the time you created the Library item?

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "galvestongirl" <webforumsuser@macromedia.com> wrote in message
              news:glkevh$1g3$1@forums.macromedia.com...
              > Here is my visitlist.lbi :
              > Below are links to some of my other pages. Feel free to contact me with
              > questions, comments or suggestions.
              > In the US: Alaska | Blue Ridge Parkway | Boston | Gulf Shores, AL |
              > Juliette,
              > AL | Kure Beach, NC | New York City | Outer Banks, NC | Savannah |
              > Shenandoah
              > Valley | Texas Hill Country | Tybee Island, GA ....
              >
              >
              > Here's my code:
              > <div class="visitlist" id="apDiv28"><!-- #BeginLibraryItem
              > "/Library/visitlist.lbi" -->
              > <style type="text/css">
              > <!--
              > .style3 {
              > color: #999999;
              > font-style: italic;
              > }
              > .style2 {font-size: xx-small}
              > -->
              > </style>
              > <title>visitlist</title>
              > <p class="style3">Below are links to some of my other pages. Feel free to
              > <a
              > href="mailto:cneuwiller@gmail.com">contact me</a> with questions, comments
              > or
              > suggestions. </p>
              > <p class="style3">In the US: Alaska | Blue Ridge Parkway | <a
              > href="Library/Boston.html">Boston </a>| Gulf Shores, AL | <a
              > href="Library/Juliette.html">Juliette, AL</a> | <a
              > href="Library/KureBeach.html">Kure Beach, NC</a> | New York City | Outer
              > Banks,
              > NC | Savannah | Shenandoah Valley | Texas Hill Country | Tybee Island,
              > GA</p>
              > <p class="style3"> </p>
              > <p class="style3"> </p>
              > <p class="style3">In Europe: France | Germany | Greece | the Netherlands |
              > Scotland | Switzerland </p>
              > <p class="style3"> </p>
              > <p class="style3">Other: my favorite photos | Vilseck DODDS teachers
              > reunions</p>
              > <p class="style3"> </p>
              > <p class="style2"><span class="style2"></span>All images within 'The
              > Wandering
              > Chick' Web site are copyright protected. They may not be downloaded or
              > otherwise copied. All rights reserved. My email address is listed
              > above.</p>
              > <!-- #EndLibraryItem --></div>
              > </body>
              > </html>
              >
              >
              > I'm using Dreamweaver CS3 on Windows Vista.
              >
              > Thanks for your response. Hope you can help me.
              >

              • 4. Re: hrefs in library
                galvestongirl Level 1
                Murray, I'm not sure what you mean: "This CSS should be in the
                external stylesheet or in the head of the parent page BEFORE inserting the
                Library item." Are you saying that there is a certain order in which items should be placed when developing my pages?

                I create a new html page, name and save it, then start adding div tags for my images. once all my images and captions are in place, i add the library item which contains all my links.

                Once the library item is attached to the page, i highlight the name of the page i want linked, then click the "link" button in properties. It then updates all my pages, and that's when I get the href="library/etc.
                • 5. Re: hrefs in library
                  Level 7
                  > Murray, I'm not sure what you mean: "This CSS should be in the
                  > external stylesheet or in the head of the parent page BEFORE inserting the
                  > Library item." Are you saying that there is a certain order in which
                  > items
                  > should be placed when developing my pages?

                  Here's what I'm saying: the only way to get CSS into a Library item is if
                  you apply it AFTER creating the Library item. That should not be done for
                  the questionable reliability I mentioned earlier. If you need to *see* the
                  CSS expressed in the Library item in Dreamweaver, then use a Design-time
                  stylesheet. Whatever CSS is needed for the proper rendering of the Library
                  item in the browser once the pages are uploaded would have to be placed in
                  the PARENT page (the page into which the Library item is inserted), not the
                  Library item.

                  My other question was about how you CREATED the Library item originally.
                  Did you build a page, insert the links, select the elements you want
                  included in the Library item, and use MODIFY | Library > Add Object to
                  Library? If that's the case, the ONLY way you could have gotten links like
                  you showed in your code snippet would be that the linked pages were actually
                  *in* the Library folder. Or did you just create the Library item, and then
                  add the links to it by manually entering them in the Link field of the
                  Property inspector? In that case, you did this incorrectly. Never enter
                  links manually in a Library item or a Template unless you understand how
                  those links will be managed by Dreamweaver.

                  Finally, you can go a long way towards helping us help you if you open your
                  Library item file, copy the code in it and paste that into a reply here.

                  --
                  Murray --- ICQ 71997575
                  Adobe Community Expert
                  (If you *MUST* email me, don't LAUGH when you do so!)
                  ==================
                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                  ==================


                  "galvestongirl" <webforumsuser@macromedia.com> wrote in message
                  news:glkii0$5m5$1@forums.macromedia.com...
                  > Murray, I'm not sure what you mean: "This CSS should be in the
                  > external stylesheet or in the head of the parent page BEFORE inserting the
                  > Library item." Are you saying that there is a certain order in which
                  > items
                  > should be placed when developing my pages?
                  >
                  > I create a new html page, name and save it, then start adding div tags for
                  > my
                  > images. once all my images and captions are in place, i add the library
                  > item
                  > which contains all my links.
                  >
                  > Once the library item is attached to the page, i highlight the name of the
                  > page i want linked, then click the "link" button in properties. It then
                  > updates all my pages, and that's when I get the href="library/etc.
                  >

                  • 6. Re: hrefs in library
                    Level 7
                    .oO(galvestongirl)

                    >Murray, I'm not sure what you mean: "This CSS should be in the
                    > external stylesheet or in the head of the parent page BEFORE inserting the
                    > Library item." Are you saying that there is a certain order in which items
                    >should be placed when developing my pages?

                    Yes. Some things don't belong to the "content" of a page, but to the
                    meta data in the page's head section, e.g. page title and stylesheets.

                    > I create a new html page, name and save it, then start adding div tags for my
                    >images. once all my images and captions are in place, i add the library item
                    >which contains all my links.

                    So far so good, but the CSS in the lib item doesn't belong there and
                    will make the final HTML code invalid.

                    Micha
                    • 7. Re: hrefs in library
                      Level 7
                      to state it a different way-

                      should not have styles in the library item, the styles should be in an
                      external linked .css file or in the head of the files using the library
                      item.

                      to see and use that style inside the library item, attach a "design time
                      stylesheet" to the library item.

                      second point-
                      If the links in the library item are coming out as /Library/filename.html in
                      the pages- It means one of two things-
                      Either the links are wrong in the .lbi file.
                      Or you are linking to things IN the Library folder.

                      case one-
                      Open the .lbi file.
                      Do a link check
                      FIX THE LINKS so they are correct IN the .lbi library file.

                      case two-
                      There should only be .lbi files in the Library folder. No other types of
                      files. No images, no css or js files. If there are, move them outside the
                      Library folder using the dw Files Panel.
                      Similar- there should only be .dwt files in the Templates folder. No other
                      files in the Templates folder- no images, no js or css, no subfolders.



                      --
                      Alan
                      Adobe Community Expert, dreamweaver

                      http://www.adobe.com/communities/experts/



                      • 8. Re: hrefs in library
                        galvestongirl Level 1
                        Here is the text that is in my visitlist.lbi :
                        [[[Below are links to some of my other pages. Feel free to contact me with questions, comments or suggestions.

                        In the US: Alaska | Blue Ridge Parkway | Boston | Gulf Shores, AL | Juliette, AL | Kure Beach, NC | New York City | Outer Banks, NC | Savannah | Shenandoah Valley | Texas Hill Country | Tybee Island, GA





                        In Europe: France | Germany | Greece | the Netherlands | Scotland | Switzerland



                        Other: my favorite photos | Vilseck DODDS teachers reunions



                        All images within 'The Wandering Chick' Web site are copyright protected. They may not be downloaded or otherwise copied. All rights reserved. My email address is listed above.]]]

                        I created the library item first in a text doc. Some of the locations (Juliette, Boston, etc.) already had pages developed, but other locations (such as Savannah), I've not yet built the page.

                        After creating the text, I then followed DW instructions on making it a library item. Each time I add a new page to my site, I edit the library item to add the new location. I then go into the library asset, highlight the location, then click the "attach link" button in Properies. I think this is what you're saying I should NOT do. But I don't know how else to do it, or where to put my visit list if not in a library. I need to be able to update it all at once instead of going into each page.

                        I think I've answered your questions, and I SO appreciate your quick responses.
                        • 9. Re: hrefs in library
                          Level 7
                          Heh - please copy CODE not content! We need to see the code in the Library
                          item.

                          --
                          Murray --- ICQ 71997575
                          Adobe Community Expert
                          (If you *MUST* email me, don't LAUGH when you do so!)
                          ==================
                          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                          ==================


                          "galvestongirl" <webforumsuser@macromedia.com> wrote in message
                          news:glkku9$8fo$1@forums.macromedia.com...
                          > Here is the text that is in my visitlist.lbi :
                          > [[[Below are links to some of my other pages. Feel free to contact me with
                          > questions, comments or suggestions.
                          >
                          > In the US: Alaska | Blue Ridge Parkway | Boston | Gulf Shores, AL |
                          > Juliette,
                          > AL | Kure Beach, NC | New York City | Outer Banks, NC | Savannah |
                          > Shenandoah
                          > Valley | Texas Hill Country | Tybee Island, GA
                          >
                          >
                          >
                          >
                          >
                          > In Europe: France | Germany | Greece | the Netherlands | Scotland |
                          > Switzerland
                          >
                          >
                          >
                          > Other: my favorite photos | Vilseck DODDS teachers reunions
                          >
                          >
                          >
                          > All images within 'The Wandering Chick' Web site are copyright protected.
                          > They
                          > may not be downloaded or otherwise copied. All rights reserved. My email
                          > address is listed above.]]]
                          >
                          > I created the library item first in a text doc. Some of the locations
                          > (Juliette, Boston, etc.) already had pages developed, but other locations
                          > (such
                          > as Savannah), I've not yet built the page.
                          >
                          > After creating the text, I then followed DW instructions on making it a
                          > library item. Each time I add a new page to my site, I edit the library
                          > item
                          > to add the new location. I then go into the library asset, highlight the
                          > location, then click the "attach link" button in Properies. I think this
                          > is
                          > what you're saying I should NOT do. But I don't know how else to do it,
                          > or
                          > where to put my visit list if not in a library. I need to be able to
                          > update it
                          > all at once instead of going into each page.
                          >
                          > I think I've answered your questions, and I SO appreciate your quick
                          > responses.
                          >

                          • 10. Re: hrefs in library
                            galvestongirl Level 1
                            Murray, I think this is the code you're asking for to my visitlist:


                            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                            <style type="text/css">
                            <!--
                            .style3 {
                            color: #999999;
                            font-style: italic;
                            }
                            .style2 {font-size: xx-small}
                            -->
                            </style>
                            <title>visitlist</title>
                            <p class="style3">Below are links to some of my other pages. Feel free to <a href="mailto:cneuwiller@gmail.com">contact me</a> with questions, comments or suggestions. </p>
                            <p class="style3">In the US: Alaska | Blue Ridge Parkway | <a href="Boston.html">Boston </a>| Gulf Shores, AL | <a href="Juliette.html">Juliette, AL</a> | <a href="KureBeach.html">Kure Beach, NC</a> | New York City | Outer Banks, NC | Savannah | Shenandoah Valley | Texas Hill Country | Tybee Island, GA</p>
                            <p class="style3"> </p>
                            <p class="style3"> </p>
                            <p class="style3">In Europe: France | Germany | Greece | the Netherlands | Scotland | Switzerland </p>
                            <p class="style3"> </p>
                            <p class="style3">Other: my favorite photos | Vilseck DODDS teachers reunions</p>
                            <p class="style3"> </p>
                            <p class="style2"><span class="style2"></span>All images within 'The Wandering Chick' Web site are copyright protected. They may not be downloaded or otherwise copied. All rights reserved. My email address is listed above.</p>
                            • 11. Re: hrefs in library
                              Level 7
                              I see another problem -

                              > </style>
                              > <title>visitlist</title>

                              You cannot have a title tag in a Library item. This should go out.

                              > <p class="style3">In the US: Alaska | Blue Ridge Parkway | <a
                              > href="Boston.html">

                              This, and other links, are WRONG. Since the link is document relative, and
                              since the file containing this link is in the Library folder, then DW is
                              doing exactly what it should do - insert the "Library" folder name in the
                              link on the target page. There would be two possible solutions -

                              1. Make those links ROOT relative, e.g.,

                              <a href="/Boston.html"

                              or

                              2. Open the Library item, and REMAKE all the links, making sure to use the
                              Property inspector's LINK field, and the Browse icon to browse to and select
                              the target file.

                              The rule in Dreamweaver ALWAYS is - the link MUST be correct for the page in
                              which the link appears. In this case, all of your links are NOT correct for
                              the Library item page. They apprear to have been made in anticipation of
                              what they should be in the final PARENT page, and that's the wrong way to do
                              it.

                              --
                              Murray --- ICQ 71997575
                              Adobe Community Expert
                              (If you *MUST* email me, don't LAUGH when you do so!)
                              ==================
                              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                              ==================


                              "galvestongirl" <webforumsuser@macromedia.com> wrote in message
                              news:glklch$8ud$1@forums.macromedia.com...
                              > Murray, I think this is the code you're asking for to my visitlist:
                              >
                              >
                              > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
                              > <style type="text/css">
                              > <!--
                              > .style3 {
                              > color: #999999;
                              > font-style: italic;
                              > }
                              > .style2 {font-size: xx-small}
                              > -->
                              > </style>
                              > <title>visitlist</title>
                              > <p class="style3">Below are links to some of my other pages. Feel free to
                              > <a
                              > href="mailto:cneuwiller@gmail.com">contact me</a> with questions, comments
                              > or
                              > suggestions. </p>
                              > <p class="style3">In the US: Alaska | Blue Ridge Parkway | <a
                              > href="Boston.html">Boston </a>| Gulf Shores, AL | <a
                              > href="Juliette.html">Juliette, AL</a> | <a href="KureBeach.html">Kure
                              > Beach,
                              > NC</a> | New York City | Outer Banks, NC | Savannah | Shenandoah Valley |
                              > Texas
                              > Hill Country | Tybee Island, GA</p>
                              > <p class="style3"> </p>
                              > <p class="style3"> </p>
                              > <p class="style3">In Europe: France | Germany | Greece | the Netherlands |
                              > Scotland | Switzerland </p>
                              > <p class="style3"> </p>
                              > <p class="style3">Other: my favorite photos | Vilseck DODDS teachers
                              > reunions</p>
                              > <p class="style3"> </p>
                              > <p class="style2"><span class="style2"></span>All images within 'The
                              > Wandering
                              > Chick' Web site are copyright protected. They may not be downloaded or
                              > otherwise copied. All rights reserved. My email address is listed
                              > above.</p>
                              >
                              >

                              • 12. Re: hrefs in library
                                galvestongirl Level 1
                                Michael Fesser responded: "So far so good, but the CSS in the lib item doesn't belong there and
                                will make the final HTML code invalid.

                                Micha"

                                It sounds like my best approach would be to put my visitlist somewhere other than in a library. But I need to be able to update it often and have the update/changes apply to every page. I will have dozens of pages. So, what is an alternative? Or, is there still hope that I can leave it as a library item??? Thanks
                                • 13. Re: hrefs in library
                                  Level 7
                                  A Library item is fine, but a server-side include would be even better.

                                  If you elect to stay with Library items, you have to use them properly - so
                                  far, you are not.

                                  --
                                  Murray --- ICQ 71997575
                                  Adobe Community Expert
                                  (If you *MUST* email me, don't LAUGH when you do so!)
                                  ==================
                                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                                  ==================


                                  "galvestongirl" <webforumsuser@macromedia.com> wrote in message
                                  news:glkmep$a9c$1@forums.macromedia.com...
                                  > Michael Fesser responded: "So far so good, but the CSS in the lib item
                                  > doesn't
                                  > belong there and
                                  > will make the final HTML code invalid.
                                  >
                                  > Micha"
                                  >
                                  > It sounds like my best approach would be to put my visitlist somewhere
                                  > other
                                  > than in a library. But I need to be able to update it often and have the
                                  > update/changes apply to every page. I will have dozens of pages. So, what
                                  > is
                                  > an alternative? Or, is there still hope that I can leave it as a library
                                  > item??? Thanks
                                  >
                                  >