|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
billmn Smarty n00b
Joined: 28 Dec 2010 Posts: 2 Location: Mantova, Italy
|
Posted: Wed Jan 12, 2011 1:54 pm Post subject: Nested custom plugin support |
|
|
Hello everyone!
I would nest custom block plugin ( named "settings" ) into the same plugin, is possibile ?
This plugin get settings from a database table with an array, ex. :
Code: | array(
[0] => array(['id'] => 30, ['category'] => 'website', ['section'] => 'SEO')
[1] => array(['id'] => 31, ['category'] => 'website', ['section'] => 'Meta')
[2] => array(['id'] => 32, ['category'] => 'website', ['section'] => 'Website Title')
[3] => array(['id'] => 33, ['category'] => 'email', ['section'] => 'POP Server')
[4] => array(['id'] => 34, ['category'] => 'email', ['section'] => 'SMTP Server')
[5] => array(['id'] => 35, ['category'] => 'email', ['section'] => 'Authentication')
) |
For example :
Code: | {settings groupby=category}
<div class="category">
<div class="cat_name">{$setting.category}</div>
<ul>
{settings category=$setting.category}
<li>{$setting.section}</li>
{/settings}
</ul>
</div>
{/settings} |
Result :
Code: | <div class="category">
<div class="cat_name">WEBSITE</div>
<ul>
<li>SEO</li>
<li>Meta</li>
<li>Website Title</li>
</ul>
</div>
...
|
Can you help me?
Thank you!!!! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|