Fetch object for all available languages

Author Message

Codeforest Smith

Friday 19 August 2011 5:38:46 am

Hi Guys,

I have a NodeID and want to get the name attribute of its ParentNodeID (which is folder) in all available languages.

Is it possible?

 

Thanks in advance

http://codeforest.net

Daniel A. Øien

Saturday 20 August 2011 4:19:41 am

I haven't tested this fully, but it should look something like this:

{def $lnode=array()}
{foreach $node.parent.object.available_languages as $language}
{set $lnode=fetch('content', 'node', hash('node_id', $node.parent.node_id, 'language_code', $language))}
{$lnode.name}
{/foreach}

Daniel A. Øien
Open Concept SA, Norway
Web: http://openconcept.no/
In English: http://openconcept.no/eng

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 02:45:28
Script start
Timing: Jan 18 2025 02:45:28
Module start 'layout'
Timing: Jan 18 2025 02:45:28
Module start 'content'
Timing: Jan 18 2025 02:45:29
Module end 'content'
Timing: Jan 18 2025 02:45:29
Script end

Main resources:

Total runtime0.8687 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.0052 589.1641152.6406
Module start 'layout' 0.00520.0026 741.804739.4844
Module start 'content' 0.00790.8596 781.2891521.7656
Module end 'content' 0.86750.0012 1,303.05478.2813
Script end 0.8686  1,311.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3688160.0002
Check MTime0.00130.1484160.0001
Mysql Total
Database connection0.00070.075610.0007
Mysqli_queries0.816393.9688540.0151
Looping result0.00070.0767520.0000
Template Total0.839396.620.4197
Template load0.00200.228620.0010
Template processing0.837396.389920.4187
Template load and register function0.00010.016410.0001
states
state_id_array0.00090.101810.0009
state_identifier_array0.00070.081620.0004
Override
Cache load0.00160.1887160.0001
Sytem overhead
Fetch class attribute can translate value0.00070.081720.0004
Fetch class attribute name0.00200.232430.0007
XML
Image XML parsing0.00070.077920.0003
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00080.0936160.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs