how to exclude current node?

Author Message

Martin Ulrich

Wednesday 28 April 2004 6:15:24 am

I have an image list with clickable thumbs.

When click on one Node as result there is the image in full view (no problem)
AND the same imagelist should appear on result page with code below (no problem too).
But what I want is, that the image in full view (which is the current node) should NOT appear in the small imagelist on the result page.

So, how can I exclude the current node from this list?

{let   image_list=fetch( content, list, hash( parent_node_id, $node.parent.node_id,
                                            limit, $image_limit,
                                            offset, $view_parameters.offset,
                                            class_filter_type, include,
                                            class_filter_array, array( 'image' ),
                                            sort_by, array( 'published', false() ) ) )


{section var=image loop=$image_list}
        {node_view_gui view=line href=$image.item.url_alias|ezurl content_node=$image.item}
{/section}
{/let}

Think something with {section-exclude match= ...}
But I dont know whats the right expression for the current node?

;-((

thanks!

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Alex Jones

Wednesday 28 April 2004 6:45:47 am

You should be able to compare the node of the displayed item against <i>$DesignKeys:used.node</i> which is the node id of the page you are on.

{section var=image loop=$image_list}
  {* Show only if the item isn't equal to the current node *}
  {section show=ne($DesignKeys:used.node,$:item.node_id)} 
    {node_view_gui view=line href=$image.item.url_alias|ezurl content_node=$image.item}
  {/section}
{/section}

Alex

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

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.