I'm building a simple gallery with some help of the menumanager. I want menu-items to appear as a gallery. When hovering the menu text should appear in a dynamic div (the image is also in that div). I tried to use {$node-->id} to tell in wich div the text should appear but apparently it's not working. If i replace al the {$node-->id} with a random number, it's working. Can someone tell me what i'm doing wrong?
This is my code:
Code: Select all
{literal}
<__script__ type="text/javascript">
function showDescription{/literal}{$node->id}{literal}(text){
document.getElementById('{/literal}1{literal}').innerHTML = text;
}
function clearDescription{/literal}{$node->id}{literal}(){
document.getElementById('{/literal}1{literal}').innerHTML = '';
}
</__script>
{/literal}
{if $count > 0}
<ul class="clearfix">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->current == true}
<li><a href="{$node->url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{elseif $node->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="activeparent"> <a href="{$node->url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext} </a>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="separator" />
{else}
<li>
<div id="projectenmatrix"><div id="{$node->id}">dfgdfgdfgdfg</div></div>
<a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if} title="{$node->menutext}"> <img src="uploads/images/Gallery/{$node->alias}/1.jpg" width="125px" onmouseover="showDescription{$node->id}('{$node->menutext}')" onmouseout="clearDescription{$node->id}();" ></a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}