Forums / Developer / Fetching objects with the specified parent nodes

Fetching objects with the specified parent nodes

Author Message

Eirik Alfstad Johansen

Monday 21 June 2004 7:55:55 am

Hi,

I need to fetch object based on a list of parent nodes. The object fetches should be nodes below all of the specified parent nodes. Is there any way of doing this using a simple template fetch?

I tried

parent_node_id, array(1, 2, etc.)

, but that just seems to fetch all the nodes in each parent node.

Thanks in advance !

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Kåre Køhler Høvik

Monday 21 June 2004 8:10:16 am

Use <your_node_object>.object to get the content object.
There is no way to fetch the child objects directly.

--
Kåre Høvik

Kåre Høvik

Eirik Alfstad Johansen

Tuesday 22 June 2004 3:40:55 am

Hi Kåre,

I think you might have misunderstood my question. My main intent is not to fetch an object but rather to make sure that the object has all the specified parent nodes.

If I do

parent_node_id, array(1, 2, etc.)

the result is all the child nodes of node 1, all the child nodes og node 2 and all the child nodes of etc. However, I would like to get the object which has nodes as childs of all these specified parent nodes.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Jan Borsodi

Tuesday 22 June 2004 4:34:38 am

I don't believe this is possible with the current functionality.

The only way is write your own fetch function or template operator to do this.
You will also need to create your own SQLs for this.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Eirik Alfstad Johansen

Wednesday 23 June 2004 2:45:50 am

Hi guys,

Thanks for your replies. I've now started working on an extension to accomplish this. However, I have run into a problem I can't understand.

According to my admin interface, the node with the id of 98 has the object id of 96 (displayed at the very top of the node in full view). However, when I do a search in the database for the row containing the id 98 in the table eznode_assignment, the field contentobject_id field contains the value 102 in the row returned.

Am I looking at the wrong fields, or perhaps the wrong tables?

Thanks in advance !

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

eZ debug

Timing: Jan 19 2025 09:54:24
Script start
Timing: Jan 19 2025 09:54:24
Module start 'content'
Timing: Jan 19 2025 09:54:24
Module end 'content'
Timing: Jan 19 2025 09:54:24
Script end

Main resources:

Total runtime0.1933 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0098 589.0859180.8125
Module start 'content' 0.00980.0107 769.898498.0547
Module end 'content' 0.02050.1727 867.9531526.3750
Script end 0.1932  1,394.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00402.0781200.0002
Check MTime0.00150.8011200.0001
Mysql Total
Database connection0.00170.894310.0017
Mysqli_queries0.130367.39761410.0009
Looping result0.00140.74421390.0000
Template Total0.172189.010.1721
Template load0.00110.556110.0011
Template processing0.171088.442210.1710
Override
Cache load0.00080.390610.0008
Sytem overhead
Fetch class attribute can translate value0.00090.481410.0009
XML
Image XML parsing0.00030.168110.0003
General
dbfile0.00733.7719200.0004
String conversion0.00000.003130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs