Page 1 of 1

how to include external template file?

Posted: Sun May 27, 2007 2:39 pm
by hp_solomon
Anyone knows how to include external template file within templates? for example, i wanted to create an external navigation php template file that will be called on some pages/templates, is that possible in phpbb3? What is the best way to do this? Any thoughts?

Thanks.

Re: how to include external template file?

Posted: Sun May 27, 2007 3:30 pm
by DualFusion
This is easily done in any phpbb3 template file...

<!-- INCLUDE file_name.html -->

replace 'file_name.html' with the file in the same directory :D If you want it in a different directory, i dont know if you can do that. i am not sure if putting '../' will work, so just try to leave it in the same directory, unless you want to try :D

Re: how to include external template file?

Posted: Sun May 27, 2007 3:38 pm
by hp_solomon
How can i make the links dynamic? I want the template file to be in php. Is that possible?

Re: how to include external template file?

Posted: Sun May 27, 2007 5:59 pm
by geoffreak
hp_solomon wrote:How can i make the links dynamic? I want the template file to be in php. Is that possible?
Not with the template system, no.
If you want to include php files, you need to enabled them in the ACP security section and then use the include method shown above ;)