I am newbie to this system
I created two templates in layout.one called "main",and another called "footer",I want to include "footer" template in "main".
Tried {template name="footer"},but not work,is there anybody how to include another template or is there any way to do this.
I can't find the answer in documents.
[how to]how to include templates in templates
Re: [how to]how to include templates in templates
Have you tried
http://smarty.php.net/manual/en/languag ... nclude.php
Code: Select all
{include file="footer.tpl"}
Re: [how to]how to include templates in templates
thanks cyberman.cyberman wrote: Have you tried
http://smarty.php.net/manual/en/languag ... nclude.phpCode: Select all
{include file="footer.tpl"}
yes,it's a solution,but you have to save a template file in server in this way.
I mean if I create templates in admin panel,can they include each other?
Re: [how to]how to include templates in templates
You can use this tool for editing files in CMSms backendcloudyfa wrote: I mean if I create templates in admin panel

http://dev.cmsmadesimple.org/projects/fileeditor/
Re: [how to]how to include templates in templates
Cool~~,I'll check itcyberman wrote:You can use this tool for editing files in CMSms backendcloudyfa wrote: I mean if I create templates in admin panel
http://dev.cmsmadesimple.org/projects/fileeditor/

PS:when I use {include file=filepath},I create a template folder in the root folder of cmsms,if I write a relative path.the file path is not "./template/file" or "../template/file",it is "../../template/file",quite strange,isn't it?

Re: [how to]how to include templates in templates
Maybe this helps for understandingcloudyfa wrote: if I write a relative path.the file path is not "./template/file" or "../template/file",it is "../../template/file",quite strange,isn't it?![]()
http://smarty.php.net/manual/en/template.resources.php
Re: [how to]how to include templates in templates
You could make them Global Content Block then put them in template...