Forum Moderators: open

Message Too Old, No Replies

Using templates in php or asp

templates

         

npmnpm

7:35 pm on Nov 7, 2002 (gmt 0)

10+ Year Member



webmasters,
what is your opinion on templates? I've noticed that almost all new and large open source web projects use them. Personlally I don't have problems using them, but I'm having problems convincing the graphic team, since the pages are splited and they don't see the full page in their editors, also images are not relative to the template but to the page that calls them, so the wysiwyg editors don't dyspaly them. Please give me some suggestions on how to work better with the graphic team and how to use wysiwyg editors with the templates better.
Would you guys (and ladies) have any suggestion on how to work with javacript image rollovers and templates, since the java script has to be in <head> part and each page need to preload their own images.
Thanks, any comment will the apreciated! :)

txbakers

9:02 pm on Nov 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



since the java script has to be in <head> part and each page need to preload their own images.

First off, I like templates. They guarantee uniformity across a site, and allow for easy changes. I build the outer skin then put two comments: <!-- content starts here --> and <!-- content ends here -->

It's rare that I need to change anything outside of those comments. (other than asp code).

What you said above about javascript is not true. You can have the same script for each page, or you could write the function in an external javascript. You would need to update the preload function as you add images, but you really only need 1 preload function on the first page.

Nick_W

9:50 pm on Nov 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I love templates, particularly the Smarty system for PHP.

No problems with images, just make all your images relative to the route. like: src=/images/etc.gif

With most template systems you can outsource different elements such as footers and nav bars and 'include' them in the template. Thus saving even more time when you need to make global changes...

Nick

Birdman

5:54 am on Nov 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's a very good point, Nick. I've got a site that has three templates plus the home page. Currently the site "appears" to have 90 pages. So when I want to make site-wide changes I only needed to change four pages. So then I thought, why not have the menu in the database too. So now I can change the menu site-wide with one click.

Amazing!