Hi there,
I have just had occasion to create a menu in a table with 1 row and multiple cells - for a horixontal menu with 1 link per cell. Now I know tables are not good for layout (there's an old argument restarted!) but I was being too lazy to tit about with a horizonlat list on one particular site. Obviously this'd only work if you have a sinfle level menu, but below is the tpl - customised from a tpl that came with the system. Enjoy it, for what its worth.
John
{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true}
url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->parent == true && $node->depth == 1}
url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
here is how to create a menu in a table for horizontal menus - .tpl code inc
Re: here is how to create a menu in a table for horizontal menus - .tpl code inc
Great , it was almost what i am looking for!
Actually i want just text links like this for the header:
link1 | link2 | link3
With no CSS..
Actually i want just text links like this for the header:
link1 | link2 | link3
With no CSS..