Forums

This topic is locked

Need alternative to templates and headers

Posted 24 Jan 2004 06:37:49
1
has voted
24 Jan 2004 06:37:49 Greg LeBreck posted:
Alright I need a better way than headers and footers than templates.

problems are when I use templates then I can't use things like a form validator i have because the template locks out the head code. Unless there is a way to fix that. I don't have a clue.

Prob with headers a nd footers is that if they have any images then you have to have a copy in all the sub folders otherwise the images don't like.

Is there anyway aroud either of these or is there a better way? I am still very new to all this.

Edited by - Nix Neon on 24 Jan 2004 06:38:10

Replies

Replied 24 Jan 2004 15:31:48
24 Jan 2004 15:31:48 Dave Thomas replied:
The way i do it, is create the page as if your making a template, so it has certain sections that can be changed, a menu area, a content area etc... but DONT save it as a template.

then save the file comlpete with all its graphics in place etc.. as template.asp (whatever you wish to call it).

all this is is an empty holding page, but because you havent defined it as a template, nothing is locked.

open your template.asp and add your content for example a news page, title, headings, content etc.. db connections, javascrit whatever you want.

then instead of saving, use "save as" instead and name it news.asp.

tada, you have a template system without the need of a dwt file. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

hope that helps.

Regards,
Dave

[DWMX 2004] | [FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
Replied 24 Jan 2004 17:18:09
24 Jan 2004 17:18:09 Greg LeBreck replied:
I have also done that in the past. Problem with that is say you add a link to the link bar well now you have to change it on everypage.
Replied 24 Jan 2004 19:24:27
24 Jan 2004 19:24:27 Dave Thomas replied:
of course you dont.

set your menu content area up, just like the other areas of your so called template. this is also an empty holding area.

example a nested table to hold the menu.
then simply have an include file with your menu items.

it doesnt affect your style or layout, and only one page needs updating.

Regards,
Dave

[DWMX 2004] | [FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]

Reply to this topic