Home › Forums › Back End › Auto include on index.php only working on home › Reply To: Auto include on index.php only working on home
September 12, 2013 at 7:04 pm
#149902
__
Participant
Hi I am trying to get it so any file that is ending in .tpl will have header and footer added. So far can only get one home page
I don’t follow. In your example above, $path
would contain “{path-to-your-document-root}/template/common/header.tpl.tpl
“. That doesn’t sound like what you’re describing.
If you want your templates to have a shared header + footer, just add them to the template:
<?php
include( 'header.tpl' );
<p>This is my page template</p>
include('footer.tpl');