Author Topic

Alex Jones

Wednesday 21 April 2004 6:27:06 am

Comment40401

Hrrrm, I'm not 100% positive on this, but I think you are trying to call the variable incorrectly. You are setting the variable with:

{set-block name=homepageContent scope=global variable=parentID}
{$Related:item.parent_nodes.0}
{/set-block}

And trying to access it with: <i>$homepageContent:parentID</i>

Try calling it with <i>$parentID</i> only and see if that works. Also, try setting the scope to <i>root</i> instead of global. Here is an example of code that works on my installation, it is a bit different than what you are trying to do, but it may help:

{set-block scope=root variable=KeyCode}
  {let parentnode=fetch('content','node',hash(node_id,$DesignKeys:used.parent_node))}
    {$parentnode.data_map.keycode.data_text}
  {/let}
{/set-block}

{section show=ne($KeyCode,'0')}{$KeyCode} - {/section}

Hope this helps,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>