Dynadot โ€” .com Transfer

Site wide changes

Spaceship Spaceship
Watch
Impact
42
can anyone tell me how to make a template so that i can add lots of pages to a site but then edit the template so that things like header, footer change site wide leaving the rest of the site unchanged

also is there a way of rotating daily the content of the homepage with the rest of the site
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
You can use PHP and use its include function to attach multiple pages.

If you want to rotate the content randomly, you can use PHP and its random function to include content on the front page randomly.

You might want to consider going to a CMS, which will manage your sites content for you, and can even change frontpage content daily. You should check out CMS Made Simple.

I've used it before and it works great.

Best of luck.

-Steve
 
0
•••
Making template based website is quite straight forward, this how my template engine works: instead of loading "normal" html documents, a PHP script is loaded which receives a GET variable included in the string (for example: pageloader.php?page=index).

Next this script looks up all the needed data in the database, included the link to a template and it loads this template using a function such as include('link'). This template is just a HTML document only at the locations where usually the page specific data goes (such as content or layout aspects), you will put PHP tags which print certain variables containing this data (coming from the database).

good luck!
 
0
•••
What I use is php for included header and footer:

<? include("header.php"); ?>
<? include("footer.php"); ?>

Call the page index.php or whatever. Then you edit your CSS file or your header/footer. This will change every single page.
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back