viktordite Posted February 1, 2010 Share Posted February 1, 2010 (edited) hi all, i am just trying to modify the /template/infoboxes/categories.html template due to have list Elements instead of tables. but can't get the "deep search" (dfs) inside the loop: {{foreach from=$BOX.CONTENT item=i} {if $i.INF_CATEGORY_LEVEL == "1"} <li id="mLev-1-{$BOX.INF_BOX_POS}"> <a href="{$i.LINK_CATEGORY}" class="mLev-1-{$BOX.INF_BOX_POS}"> {if $i.INF_CATEGORY_SELECTED} <strong>{$i.TEXT_CATEGORY_NAME}</strong> {else} {$i.TEXT_CATEGORY_NAME} {/if} </a> </li> {elseif $i.INF_CATEGORY_LEVEL == "2"} <ul><li id="mLev-2-{$BOX.INF_BOX_POS}"> <a href="{$i.LINK_CATEGORY}" class="mLev-2-{$BOX.INF_BOX_POS}"> {if $i.INF_CATEGORY_SELECTED} <strong>{$i.TEXT_CATEGORY_NAME}</strong> {else} {$i.TEXT_CATEGORY_NAME} {/if} </a> </li> </ul> {elseif $i.INF_CATEGORY_LEVEL == "3"} <li id="mLev-3-{$BOX.INF_BOX_POS}"> <a href="{$i.LINK_CATEGORY}" class="mLev-3-{$BOX.INF_BOX_POS}"> {if $i.INF_CATEGORY_SELECTED} <strong>{$i.TEXT_CATEGORY_NAME}</strong> {else} {$i.TEXT_CATEGORY_NAME} {/if} </a> </li> {/if} {/foreach} would like to have nested <ul>s like these: <ul> <li>first level</li> <li>first level</li> <ul> <li>second level</li> <li>second level</li> </ul> <ul> <ul> <li>third level</li> <li>third level</li> </ul> </ul> <li>first level</li> </ul> does anybody have an idea? Edited February 1, 2010 by viktordite Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.