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.

eZ debug

Timing: Jan 19 2025 13:49:35
Script start
Timing: Jan 19 2025 13:49:35
Module start 'layout'
Timing: Jan 19 2025 13:49:35
Module start 'content'
Timing: Jan 19 2025 13:49:36
Module end 'content'
Timing: Jan 19 2025 13:49:36
Script end

Main resources:

Total runtime0.9473 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1641152.6250
Module start 'layout' 0.00710.0051 741.789139.4453
Module start 'content' 0.01230.9335 781.2344524.1406
Module end 'content' 0.94570.0015 1,305.37508.1641
Script end 0.9472  1,313.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3977160.0002
Check MTime0.00160.1656160.0001
Mysql Total
Database connection0.00140.149910.0014
Mysqli_queries0.894294.4030540.0166
Looping result0.00060.0586520.0000
Template Total0.909896.020.4549
Template load0.00260.277020.0013
Template processing0.907295.769220.4536
Template load and register function0.00020.023810.0002
states
state_id_array0.00070.075910.0007
state_identifier_array0.00080.088420.0004
Override
Cache load0.00200.2065180.0001
Sytem overhead
Fetch class attribute can translate value0.00120.125020.0006
Fetch class attribute name0.00100.103030.0003
XML
Image XML parsing0.00080.080620.0004
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00100.1097160.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs