Ciao a tutti,
sto facendo un menu in cui alcune label sono sectionheader, vorrei che queste fossero link del primo figlio che contengono... ho dato un okkio al codice ma non ne vengo fuori...
menu: stampare l'url del primo figlio di un sectionheader
Moderator: magallo
Re: menu: stampare l'url del primo figlio di un sectionheader
Cerca nel forum perchè era già stato richiesto e credo fosse uscito un UDTaxxe16 wrote: Ciao a tutti,
sto facendo un menu in cui alcune label sono sectionheader, vorrei che queste fossero link del primo figlio che contengono... ho dato un okkio al codice ma non ne vengo fuori...
Alby
Re: menu: stampare l'url del primo figlio di un sectionheader
umh ok, in effetti ho cercato prima di postare... ma forse ho usato le key sbagliate ora vedo, grazie 

Re: menu: stampare l'url del primo figlio di un sectionheader
cercando meglio l'ho trovato !
Ma non funziona...
Se siete interessati il link al threat è questo:
http://wiki.cmsmadesimple.org/index.php ... k_to_child
ma quello che mi linka è il link successivo non il figlio...
Questo è lo script
Ma non funziona...
Se siete interessati il link al threat è questo:
http://wiki.cmsmadesimple.org/index.php ... k_to_child
ma quello che mi linka è il link successivo non il figlio...
Questo è lo script
{* CSS classes used in this template:
#active - The active/current page
.sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $doheaderlink == "1"}
{assign var="doheaderlink" value="0"}
url}">{$headertext}
{/if}
{if $node->depth == 1 or $showchildren == 1}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{assign var="listopen" value="1"}
{elseif $node->depth prevdepth}
{if $listopen == "1"}
{repeat string="" times=$node->prevdepth-$node->depth}
{assign var="listopen" value="0"}
{/if}
{elseif $node->index > 0}
{/if}
{if $node->current == true}
url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}
{elseif $node->type == 'sectionheader'}
{assign var="doheaderlink" value="1"}
{if $node->parent == true}
{assign var="showchildren" value="1"}
{else}
{assign var="showchildren" value="0"}
{/if}
{assign var="headertext" value=$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}{/if}
{/if}
{/foreach}
{if $listopen == "1"}
{repeat string="" times=$node->depth-1}
{/if}
{/if}