#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Oswestry, Shropshire
    Posts
    3
    Rep Power
    0

    implementing templates


    Hi,
    I'm building a web page at the mo, but want to use a prog language or anything so that I can make one template, whcih each page on my site uses. So I make one template, with the menu and other links and such on, that each page uses. Any ideas what I would use to do this?
    Cheers
    -Jonathan
  2. #2
  3. No Profile Picture
    Python Prophet
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Amersfoort, The Netherlands
    Posts
    45
    Rep Power
    14
    If they are the same on every page, just make a function called site_header(), in there output the menu. Call it before any other output, and you're done. After that, make a function called site_footer(), put in the closing tags(</table> etc.) and call it after the rest of the output.
    Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems. - Jamie Zawinski, in comp.lang.emacs
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2001
    Location
    London, UK
    Posts
    661
    Rep Power
    13
    or u could just use includes

IMN logo majestic logo threadwatch logo seochat tools logo