PDA

View Full Version : Templates - what am I missing?


legovf
03-24-2010, 02:18 PM
I created a template containing navigation links (in pop-up menus) to other pages within the site. It resides in the Templates folder in the site's root directory. All web pages, except the index.htm will reside in the HTM folder, also located within the root. Index.htm will reside in the root. I used the template to create the index.htm under the root and other pages in the HTM folder. Links are relative to document. They work for the pages in the HTM folder but not for index.htm. I thought template was suppose to adjust path to links, pics etc based on location of where new pages were placed. But no adjustments are being made.

Corrosive
03-24-2010, 02:21 PM
Why not just put all pages in the root?

legovf
03-24-2010, 02:31 PM
Why not just put all pages in the root?

...but I figured links would then not work for all pages. Problem see to be that it needs to jump up one directory, which is OK from the templates folder not for files existing in the root. Right now there's only one index.htm

DWcourse
03-24-2010, 02:34 PM
When you create a page from a template the links will adjust to the new location of the file provided:


You create the file through the New Document file dialog (menu: File>New… or control+N/command+N). Opening the template and using Save As… doesn't work.

The links aren't in an editable region of the template (editable regions don't change with the template).

legovf
03-24-2010, 02:46 PM
Links are not in an editable region. I tried creating pages two ways
1. File, New, Select Template, add data to editable region and save.
2. Saved HTM page containing variable data, then applied Template.
Reference to file on template is ..\html\file.htm and remains same whether I save new pages in root or html folder. Works OK for the latter but not for files in root (when it jumps up one, it can't find web page). PS - I'm doing this on my local drive not server

DWcourse
03-24-2010, 02:49 PM
Hmm? I assume you defined your site correctly. If so, it shouldn't matter if you're on a local disk.

legovf
03-24-2010, 03:20 PM
Site definition is OK, only thing I can think of there that might have an effect is if I screwed up where I said I housed the files.

Corrosive
03-24-2010, 03:26 PM
Convention is to have your page files in the root of your site. Putting pages in different folders will screw stuff up IMO.

legovf
03-24-2010, 05:09 PM
I was following suggestions made in this article - http://www.ehow.com/how_4724133_organize-your-website.html.
Thanks for the help, will add a post if I ever figure out where I'm going wrong. Will try again from scratch, placing all htm files in root

Corrosive
03-24-2010, 05:14 PM
No, sorry. ehow is usually pretty good but I can't figure why you need a 'pages' folder unless anyone can shed any light? I just put pages in the root.

DWcourse
03-24-2010, 07:55 PM
Ddi you move the pages after creating them?