Question about Smarty include function
Posted: Mon Feb 13, 2006 7:53 pm
I am working on updating the Bookmarks module and I ran into a slight snag in the idea that I had so I figured i would toss it up and see if anyone knows.
In smarty you can use the {include file="blah.tpl"} to include external templates.
Now while building my template I have 3 files total:
1. adminpanel.tpl
2. listcats.tpl
3. listlinks.tpl
What I have code wise is:
Then in my module I have
Now when it comes up in the panel I get the following error:
string(82) "Smarty error: unable to read resource: "listlinks.tpl""
So im assuming that somewhere there is something that is causing issues. I tried to find a call somewhere to reference where the tpl is... but no luck.
So any help would be greatful. This is my first project working with smarty and cmsms... so please leave the noob bashing to a minimum, or take it to pm... I will laugh heartily there
thanks
nick
In smarty you can use the {include file="blah.tpl"} to include external templates.
Now while building my template I have 3 files total:
1. adminpanel.tpl
2. listcats.tpl
3. listlinks.tpl
What I have code wise is:
Code: Select all
{$start_links_tab}
{include file="$listlinkstpl"}
{$end_tab}
{$start_cats_tab}
{include file="$listcatstpl"}
{$end_tab}
Code: Select all
// Assign the included templates, so it knows where to get them... I hope
$this->smarty->assign('listlinkstpl','listlinks.tpl');
$this->smarty->assign('listcatstpl','listcats.tpl');
// Display the populated template
echo $this->ProcessTemplate('adminpanel.tpl');
string(82) "Smarty error: unable to read resource: "listlinks.tpl""
So im assuming that somewhere there is something that is causing issues. I tried to find a call somewhere to reference where the tpl is... but no luck.
So any help would be greatful. This is my first project working with smarty and cmsms... so please leave the noob bashing to a minimum, or take it to pm... I will laugh heartily there

thanks
nick