|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Implementing a template
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
|
||||
|
||||
|
If you're on a *nix server with Apache, probably the easiest way is with a Server-Side Include (SSI) directive- you can create a header, footer, and navigation section of your page, and then "include" this in your "data" pages with simple HTML comment looking directives.
www.webmonkey.com has a good SSI tutorial (though it's specific to inserting the time into a document, it's a good starting point..) I highly recommend learning how to use SSI before you really dive into a programming language like php or perl. SSI is simple, powerful, and in some cases the best tool for the job. Good luck! The tutorial is below. I believe it works similarly on IIS, too. http://hotwired.lycos.com/webmonkey/96/38/index3a.html |
|
#3
|
||||
|
||||
|
ssi is a toy...although it might be a good idea to begin from it, it sure is not to stay with it. Read devshed's articles about templates.
__________________
And you know I mean that. |
|
#4
|
||||
|
||||
|
While SSI may be a "toy," this is a beginners forum, and using SSI to make a templatted website will teach you quite a few things about reusing code, centralizing features and thinking in terms of minimizing your typing. It will also help you think about your site as discreet components, a wicked good concept to start CGI programming with.
I think calling it a toy is way too harsh. I know quite a few production websites that use SSI to generate some of thier pages because it's fast, simple, and powerful. They pregenerate static HTML that they then stitch together with SSI directives, making complete dynamic pages with very low processor overhead. (far lower that even mod_perl or php). SSI isn't a toy. It's a tool to be used when appropriate. |
|
#5
|
|||
|
|||
|
cheers guys - thats a great help
![]() -Faulky |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Implementing a template |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|