common code for serveral files in tpl- html??

I have some .TPL files (basically they are inside HTML), actually they are a PHPBB skin, and i want to include some portions of code to be read from an common place for several different .tpl files

lets say i want to include 10 lines of code, located in "banner.html", in 10 different .TPL files, I'm not going to write this 10 times over again everytime I change it, hOw can i set this code in a commonplace for all the files??

Open in new window

axturAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
WodConnect With a Mentor Commented:
or maybe your TPL files need to be broken down into smaller files?
0
 
WodCommented:
you could convert your banner.html to banner.tpl and then use this inside your main tpl (ie: sidebar):

{include file='banner.tpl'}
0
 
axturAuthor Commented:
It doesn't work, it would display {include file='banner.tpl'} instead of the code contained in banner.tpl...
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
WodCommented:
try to add that line in a PHP file of the skin and not inside a TPL file
0
 
axturAuthor Commented:
That would be easy :), but what i need is the tpl file to read from another tpl / html file
0
 
WodCommented:
would it work if you add it at the very beginning or end of the TPL ?

if that would work for you, you could add it in the PHP right before or right after that TPL gets loaded and it would be like it's part of the other TPL

0
 
axturAuthor Commented:
I think I'm gonna break my tpl file into smaller ones, since I can't find the way to "include" other tpl files into another one. And change the PHP code, I don't like this solution, is not very "elegant", but works just fine.
0
All Courses

From novice to tech pro — start learning today.