Opposite of main_node_only?

Author Message

Mindshare Interactive Campaigns

Monday 03 July 2006 12:04:52 pm

According to http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list you can use the "main_node_only" parameter with fetch to only bring back nodes whose main location is the node you're using as parent_node_id. For example, if you had this content structure:

|-Folder 1
|----Article A (main location)
|----Article B (main location)
|
|-Folder 2
|----Article C (main location)
|----Article A (<i>reference</i> location)

etc.

Setting main_node_only to true and specifying Folder 2 as my parent_node_id will bring back only Article C. The same fetch with main_node_only set to false will bring back Article C and Article A. What I'm looking for is a way to do this fetch to <b>only</b> pull back Article A (and all other content with a non-main location under Folder 2) when the parent node == Folder 2.

Any ideas? Thanks in advance.

http://www.mindshare.net

Ɓukasz Serwatka

Tuesday 04 July 2006 12:16:53 am

This is not possible with fetch function by default. Workaround can be filtering during foreach loop (check $node.is_main) or with some PHP coding make extended fetch function.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Mindshare Interactive Campaigns

Wednesday 05 July 2006 7:00:37 am

Lukasz,

Thanks for the reply. We'll try that "is_main_node" parameter and filter our fetch results.

http://www.mindshare.net

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:08:38
Script start
Timing: Jan 18 2025 16:08:38
Module start 'layout'
Timing: Jan 18 2025 16:08:38
Module start 'content'
Timing: Jan 18 2025 16:08:39
Module end 'content'
Timing: Jan 18 2025 16:08:39
Script end

Main resources:

Total runtime0.6623 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9141152.6250
Module start 'layout' 0.00510.0025 740.539139.4453
Module start 'content' 0.00760.6532 779.9844535.1563
Module end 'content' 0.66080.0014 1,315.140612.1641
Script end 0.6623  1,327.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.4392160.0002
Check MTime0.00130.1952160.0001
Mysql Total
Database connection0.00060.094110.0006
Mysqli_queries0.619793.5658570.0109
Looping result0.00040.0679550.0000
Template Total0.634995.920.3175
Template load0.00150.219220.0007
Template processing0.633495.641620.3167
Template load and register function0.00020.025410.0002
states
state_id_array0.00100.145910.0010
state_identifier_array0.00120.173920.0006
Override
Cache load0.00120.1797200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.074020.0002
Fetch class attribute name0.00100.150740.0002
XML
Image XML parsing0.00060.086620.0003
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00130.1962180.0001
String conversion0.00000.001040.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
3content/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
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs