Skip to main content
Participant
Apr 13, 2020 7:41 PM UTC
Question

How do i make a header/footer a template that updates all pages after I've designed the website?

I've made a responsive website and didn't make it an updated template. I need the header and footer to update all the pages I've already designed.

 

How do I make the header and footer a template that updates all the pages I've already designed???

 

Help!

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

BenPleysier
Community Expert
Community Expert
Apr 13, 2020 9:21 PM UTC

A Single Page Application (SPA) is the easiest of all templates. 

 

 

This is where the Header and Footer always stay in place and the content gets drawn in as required. Search Google for SPA.

 

You could also have a look at https://github.com/Wappler/Starter-Boilerplate and an explanation at https://www.youtube.com/watch?v=7a0qE6yWyQM

Translate
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Legend
Apr 13, 2020 8:42 PM UTC

Using PHP, put your header and footer content in two separate files for example header.php and footer.php  then include the content in other PHP pages like this:

<?php include 'header.php'; ?>

I'd advocate this method over using the built in Dreamweaver template feature.

Translate
Paul-M - Community Expert
Nancy OShea
Community Expert
Community Expert
Apr 13, 2020 7:53 PM UTC

You don't.  The Template creation process starts at the beginning of your project, not at the end. You already put your cart ahead of the horse, so Templates are not an option unless you want to re-build your site.

 

If your server supports PHP scripts, look at PHP server-side includes.  They are much better than DW Templates for managing sitewide elements like navigation, headers and footers.

https://alt-web.blogspot.com/2015/07/server-side-includes-with-php.html

 

You will need to replace some code in your various pages with server-side include statements, but it won't take long with copy & paste.

https://alt-web.blogspot.com/2015/07/server-side-includes-with-php.html

 

Translate
Nancy O'Shea— Product User & Community Expert