Best way to keep same layout across multiple pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jessels
Forum Newbie
Posts: 2
Joined: Sat Oct 08, 2011 2:52 pm

Best way to keep same layout across multiple pages

Post by Jessels »

Hi everyone! :)

I was just wondering if I would be able to get some advice on how to set up a website I'm working on for school. The website has the basic home, about, contact pages and then a students page, which will link to 80 student profiles - the profile pages will still use the same layout and design as the rest of the website (header, nav, footer), just with custom styling for the div containing the profile content. I haven't created a website with this amount of content before - I am also unable to use a cms for this project. I would like to be able to easily edit the header, nav, footer (everything that is repeated on each page) through one file, and have these changes applied to all the pages on the website.

I found this website after googling about it: http://www.sitefundamentals.com/include ... web-pages/

I remember using these php includes back in 2007. So I was just wondering if there are any new and improved ways of going about this, or is this still a good way?

I would be very grateful for any help! :D
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Best way to keep same layout across multiple pages

Post by Christopher »

I would recommend using a layout template and inserting the content for each page into it.
(#10850)
Jessels
Forum Newbie
Posts: 2
Joined: Sat Oct 08, 2011 2:52 pm

Re: Best way to keep same layout across multiple pages

Post by Jessels »

Thanks for the reply! :)

Sorry I'm not exactly sure how I would go about doing that, you mean like a dynamic one right? I tried searching for it, but just ended with results on actual layout templates to download. If it's not too much trouble, would you mind posting a link to a website which explains what one is/how to make one. Haha sorry ^^;; thanks alot anyways! ^^
Post Reply