Fetch functions

Author Message

David Santiso

Saturday 29 January 2011 9:46:23 am

Hi,

I want to display all information collected from an object.

I've used "collected_info_collection" but if I put a collection identifier, just shows me the information of this collection. If I put the object identifier, only shows me the information of the first collection of that object.

How can I display all the information of all collections of only one particular object?

Thanks,

David

scrieler _

Monday 31 January 2011 7:47:14 am

you can search your value with

{$collection|attribute(show,2)}

for example, or you loop the array

{foreach $collection.attributes as $attribute}
{$attribute.contentclass_attribute_name|wash()}:
{attribute_result_gui view=info attribute=$attribute}

{/foreach}

David Santiso

Monday 31 January 2011 10:59:01 am

But, this is to show attributes of a collection, no collections of a object. For example, If I put this, the result is as follows:

[name] [surname] [email] [favourite_color]

But I want this:

[name1] [surname1] [email1] [favourite_color1]

[name2] [surname2] [email2] [favourite_color2]

[name2] [surname2] [email2] [favourite_color2]

...

David Santiso

Monday 31 January 2011 11:33:56 am

I will try to express what I want to do using pseudocode:

$collections = all collections from [object_id];

foreach $collections as $collection

$attributes = all attributes from [$collection];

foreach $attributtes as $attribute

write $attribute;

endforeach

endforeach

Result:

Collection 1 -> attribute1, attribute2, etc.

Collection 2 -> attribute 1, attribute2, etc.

...

Collection n -> attribute 1, ... attribute n.

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 30 2025 00:46:32
Script start
Timing: Jan 30 2025 00:46:32
Module start 'layout'
Timing: Jan 30 2025 00:46:32
Module start 'content'
Timing: Jan 30 2025 00:46:32
Module end 'content'
Timing: Jan 30 2025 00:46:32
Script end

Main resources:

Total runtime0.0162 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.0078151.1953
Module start 'layout' 0.00560.0026 739.203136.6250
Module start 'content' 0.00820.0062 775.828190.2344
Module end 'content' 0.01450.0017 866.062533.9766
Script end 0.0161  900.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.2833140.0002
Check MTime0.00116.9575140.0001
Mysql Total
Database connection0.00085.141810.0008
Mysqli_queries0.002414.803630.0008
Looping result0.00000.087010.0000
Template Total0.00116.810.0011
Template load0.00084.858910.0008
Template processing0.00031.910010.0003
Override
Cache load0.00053.357210.0005
General
dbfile0.00116.698180.0001
String conversion0.00000.057540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs