SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Dreamweaver Templates and menu links

    Hi all

    Another real newbie question - please do not kill me if this has already been answered elsewhere.

    I have the following problem: I would like to use Dreamweaver Templates to create a new site, because changes on the menus, etc. can then be done only once for all pages. BUT: seems like the menu links then all point to /TEMPLATES/*.html. How do I use the template AND have menus with normal links, ie /webdesign/webdesign.html, not /TEMPLATES/webdesign.html, without dissociating the files created from the template.

    Also, if there is no workaround, will these links containing TEMPLATES influence my ranking in the search engines - as I heard you have to try and use your keywords in your directories as well.

  2. #2
    Object Not Found junjun's Avatar
    Join Date
    Mar 2002
    Location
    northern MI
    Posts
    1,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure you set up a site definition first. If you got it set up it should automatically make sure your paths are right.

    Also make sure you make new pages by 'New->From Template' (or similar, don't have DW in front of me right now).

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    junjun - thanks, but my site definition has been setup and I have created all the pages as you mention above from New-->Template. The problem is that since the template is under root in /Templates, and contains the menu code - those menu links are setup as /Templates/*.html. I tried to move the template to the root or to the same folder level as the rest of the html, but Dreamweaver complained and said that all pages associated with this template, might no be disassociated???

  4. #4
    Guru Meditation Error gnarly's Avatar
    Join Date
    Dec 2003
    Location
    Cheltenham, United Kingdom
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are these links in an editable region or not?

    Have you tried making them absolute links, e.g. "/foo/bar.htm" as opposed to just "bar.htm"?
    Olly Hodgson
    thinkdrastic.net

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jip - that did the trick! I made the links absolute and Dreamweaver now leaves them alone! I normally use relative links to easily show sites on my machine to clients. Guess you cannot have the best of both worlds! :-(

  6. #6
    SitePoint Zealot cpiwc's Avatar
    Join Date
    Aug 2003
    Location
    NJ
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think if you use relative links, you need to actually link to the file's location in reference to where the template is. When you create each new file based on that template, it then adjusts. It's been a while since I've used a DW template, but that's what I'm remembering.

    So in the template link it as ../index.html instead of index.html.
    Cara

  7. #7
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use files relative to your template. After creating a site definition, and you save a page as a template it gets created automatically in a Templates folder. Make sure that there is nothing inside that Templates folder apart from the dwt file. When creating links in your template page, make sure you 'browse' to the file you want linked to do not just type it into the PI.... I use site relative links all the time and never have any problems ...

    You also need to use the Create New- from Template when creating a new child page... do not save another page as a child page of that template...

    Nadia

  8. #8
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, just to add, if you are using the Dreamweaver popup menus (which you are best to avoid at all costs), then you will have all sorts of bother, because all links are hard coded into the js file and template management will not read the links and therefore won't update the links in the js file.

    Hope this helps

    Nadia

  9. #9
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys - I just found out that this is actually a bug in Dreamweaver 8 and seems like upgrading to 8.01 should fix it.

    DWMX 2004 correctly wrote the URL as relative to the HTML document DW 8 is incorrectly writing the URL relative to the template.

    Unfortunately the update refuses to work. It goes through all the motions, but when you open Dreamweaver it is still version 8 and the new link in Sites/New Site/Advanced-->templates does not appear! Any help on updating Dreamweaver? I am going to log a support call with Adobe, but I cannot see that that will accomplish much :-(

  10. #10
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure that that info is exactly correct :-) I've always created my templates the same way (way back versions) and never had any problems with linking issues. I do know that in DW2004 you could get away with typing in links via the PI but you should really 'browse' to the file you wish to link to and choose 'relative to document' ... anyway......the latest patch is 8.02 You can skip the 8.01, when you update with the 8.02 it includes the previous update....
    This tech note may help:
    http://www.adobe.com/cfusion/knowled...fm?id=785362aa

    Nadia

  11. #11
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nadia

    Thanks a million!! This tech note really helped. I was finally able to install the updater and my problem with templates and relative links is now fixed.

    Thanks Guys - you are the greates!!!

  12. #12
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mizu yaru
    Nadia
    Thanks a million!! This tech note really helped. I was finally able to install the updater and my problem with templates and relative links is now fixed.
    You're welcome. Yep, I thought the updater would fix things for you ;-)

    Nadia


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •