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.