Include a Template in anther Template
Posted: Sat May 30, 2009 12:21 pm
Hi CMSMS's world, i'm newbie to this CMS and i'm using it for building a site. I'm finding it speedy and easy, so i make my compliments to the comunity is supporting it.
I've a question about template.
I look around the forum but i didn't find answers. During the developping i notice that templates have common parts like header, meta and footer. So i tried to create separate templates for that parts and include them in a page specific template (this for a create a better mainting code). Looking around i tried with smarty tag include
but i notice that there is no way to specify a relative path. if i insert an abosolute path it functions, but if i do that when i go in production site i have to chage all the include and that is not good.
Is there any way to include a template not from a file but from the DB that is where CMSMS stores them or to inclue them from file with a relative path.
Thank you for your attention
Piero Longhetto - Italy
I've a question about template.
I look around the forum but i didn't find answers. During the developping i notice that templates have common parts like header, meta and footer. So i tried to create separate templates for that parts and include them in a page specific template (this for a create a better mainting code). Looking around i tried with smarty tag include
Code: Select all
{include file="file:relative/path/to/template.tpl"}
Is there any way to include a template not from a file but from the DB that is where CMSMS stores them or to inclue them from file with a relative path.
Thank you for your attention
Piero Longhetto - Italy