Mobile app version of vmapp.org
Login or Join
Sent6035632

: How to auto update pages on website with similar layout If I have a website that hosts 5-10 static pages, and all of them have the same basic layout but different content, what is the best

@Sent6035632

Posted in: #WebDevelopment #WebsiteDesign

If I have a website that hosts 5-10 static pages, and all of them have the same basic layout but different content, what is the best way to configure them to all update simultaneously?

Ex: Every page on my website has a header and footer. I want to add a link to the header. How do I do this without having to update all the pages individually?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

1 Comments

Sorted by latest first Latest Oldest Best

 

@Barnes591

I am assuming you got simple static HTML files.

Convert all HTML files into PHP files.

Identify common content in header and footer and put into separate php files like: top-header.php footer.php etc.

Now, remove common header and footer content from each file and just call header and footer php files like:




Now, if you update a link in the header file it will automatically show on all pages.

Note: If you got live pages then ensure all those HTML redirects to respective PHP files and it should be permanent 301 redirects.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme