0

I have created few templates which will be used within my design. For example nodes at the adjacent trunks at the same level with have the same layout/navigation bar, but additional content will differ. Templates are rough and need much more work, I will surely return to them in the future to modify them. In the meantime I will work on other elements of on each pages that is unique to each one.

How do I include given template for example sub_folder_temp.html in every element I want it to. I know that I could copy and paste it at the beginning of the HTML file or write a script that does it. Is there any command that would allow to import HTML template or how else do I go about including it?

Thanks

Sorry if I am not being very clear, quite new to this. Slightly difficult to express exactly what I want.

mega_creamery
  • 667
  • 7
  • 19
  • Possible duplicate of [Include another HTML file in a HTML file](http://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file) – bpeterson76 May 19 '16 at 19:50

1 Answers1

1

Create new file called header.php for example, include all what is needed in here, then in file you want use it in, do like this:

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

Then you can just type content and header will stay the same. You can obviously do same thing with footer.

inteNsE-
  • 115
  • 1
  • 4
  • 13