Author Topic

Alex Jones

Thursday 22 April 2004 7:38:49 am

Comment40409

Well, one quick note: you don't need to use those two instances of <i>{section-else}</i> as you are not executing any other code. So you can tighten it up to look like:

{section show=ne($Related:item.data_map.thumbnail.content.id,'')}
  {set myobject=fetch( 'content', 'object', hash( 'object_id', $Related:item.data_map.thumbnail.content.id ))}
  {set-block name=homepageContent scope=global variable=mythumbnail}
    {section show=ne($Related:myobject,'')}
      <img src="{$Related:myobject.main_node.data_map.image.content.small.url}" alt="{$Related:myobject.main_node.data_map.caption.content.output.output_text}">
    {/section}
  {/set-block}
{/section}

Alex

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

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