Fetch nodes with several locations - avoid duplication

Author Message

laurent le cadet

Thursday 25 October 2007 1:17:38 am

hi,

I have this situation :

Objects main nodes are in a folder and there is additionnal locations in a subtree (not for all nodes).
Some nodes can have several locations in this subtree.
I want to fetch the last 5 items published in the subtree but I want to avoid duplication of nodes which have several locations.
I can't use main_node_only because they are elsewhere.

Stuck!

Any hint.

Regards.

Laurent

Sebastiaan van der Vliet

Friday 02 November 2007 9:18:26 am

Hi Laurent,

This could probably be solved by using an extended attribute filter. Check out: extendedattributefilter.ini and http://ez.no/developer/contribs/template_plugins/objectrelationfilter. With the extended attribute filter it is possible to add SQL code to the standard query used for the fetch.

Best regards,
Sebastiaan

Certified eZ publish developer with over 9 years of eZ publish experience. Available for challenging eZ publish projects as a technical consultant, project manager, trouble shooter or strategic advisor.

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 18 2025 16:06:36
Script start
Timing: Jan 18 2025 16:06:36
Module start 'layout'
Timing: Jan 18 2025 16:06:36
Module start 'content'
Timing: Jan 18 2025 16:06:37
Module end 'content'
Timing: Jan 18 2025 16:06:37
Script end

Main resources:

Total runtime0.9785 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.0119 588.1563152.6563
Module start 'layout' 0.01190.0067 740.812539.5078
Module start 'content' 0.01850.9585 780.3203531.9219
Module end 'content' 0.97710.0014 1,312.24228.1094
Script end 0.9785  1,320.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3794160.0002
Check MTime0.00170.1748160.0001
Mysql Total
Database connection0.00590.608110.0059
Mysqli_queries0.914693.4658540.0169
Looping result0.00050.0545520.0000
Template Total0.925194.520.4625
Template load0.00270.274620.0013
Template processing0.922494.262020.4612
Template load and register function0.00010.010010.0001
states
state_id_array0.00130.131410.0013
state_identifier_array0.00150.158020.0008
Override
Cache load0.00230.2350200.0001
Sytem overhead
Fetch class attribute can translate value0.00080.079320.0004
Fetch class attribute name0.00190.193040.0005
XML
Image XML parsing0.00350.354120.0017
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00340.3474230.0001
String conversion0.00000.001140.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs