Hello,
I have a module with its .tpl templates; I want to include one of these templates inside another (both tempates are in "modules/MyModule/templates" dir). I tried with the smarty {include} without success.
Is it possible?
Thanks
Include .tpl template inside another
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Include .tpl template inside another
Code: Select all
{include file='module_file_tpl:MyModule;templatename.tpl}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Include .tpl template inside another
Thank you, Robert.
It works but there's a weird behaviour:
in cms page template I have:
It works but there's a weird behaviour:
in cms page template I have:
the included .tpl starts with:<div class="main_container">{content}...
the generated html output is:<div class="col-md-3 left_col">
I solved adding a css rule to hide the empty paragraph; not very clean but it works.<div class="main_container"><p></p><div class="col-md-3 left_col">
Re: Include .tpl template inside another
thanks fort that.