Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old November 12th, 2001, 07:13 AM
Faulky Faulky is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Oswestry, Shropshire
Posts: 3 Faulky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 12th, 2001, 08:50 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
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

Reply With Quote
  #3  
Old November 12th, 2001, 11:18 AM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 17
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
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.

Reply With Quote
  #4  
Old November 12th, 2001, 05:17 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,632 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 12 m 33 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
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.

Reply With Quote
  #5  
Old November 12th, 2001, 05:31 PM
Faulky Faulky is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Oswestry, Shropshire
Posts: 3 Faulky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cheers guys - thats a great help
-Faulky

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Implementing a template


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway