Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm a playing around with website building by following the tutorials of user "createthenet", a.k.a. Timothy, on YouTube. The steps to follow are simple enough, but I notice that what he often does is begin with a template, then build pages off of that template.

Not to advertise on his behalf, but I'll use his site as an example. When I click on "Welcome", "About", "Tutorials", etc., most of the site, such as the header area, remains the same.

This saves work when building the site, but suppose I had 50 pages all with the same header area. Then if I decide to change the header area. I'd have to modify 50 files.

Is there a better way of achieving this so that I can modify the header in one file, and it'll be reflected in the other 49?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

What you're looking for is generally referred to as an "include". Server side programming languages like PHP and others offer this functionality. All you have to do is create a header or footer file with the common code on it and then "include" it into each page you want to use it.

share|improve this answer
    
I see, I'll look into it then. –  xiongtx Apr 26 '12 at 3:07

Ya. John is right. Please refer here for more info http://php.net/manual/en/function.include.php

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.