Object relations datatype

Author Message

David Santiso

Friday 18 March 2011 2:20:36 pm

Hi,

I'm using object relations datatype into a object. I've created several objects reference other objects.

If I do this:

{attribute_view_gui attribute=$node.data_map.reference}

It shows a reference to the nother object, but I want to know which is the object identifier.

If I do this:

{set-block variable=$reference}
  {attribute_view_gui attribute=$node.data_map.category}
{/set-block}
...
{$reference.contentobject_id}

It displays the identifier of the object I am seeing.

How can I do?

Thanks,

David

Ivan Švogor

Saturday 19 March 2011 8:25:58 am

Hello,

If I understand correctly, you would like object identifier of the related class object. You can use relation_list attribute, like this:

$node.data_map.relation_kategorija.content.relation_list

And than you get array of IDs. With this, you can use a fetch function to fetch objects you want.

Hope this helps.

David Santiso

Saturday 19 March 2011 9:53:36 am

Yes, I want object identifier of the related class object.

I don't understand that you mean with:

"relation_kategorija"

Damien Pobel

Sunday 20 March 2011 4:39:03 am

Hi David,

relation_kategorija is the identifier of the attribute you defined in the content class. From your examples, it's reference or category.

Cheers

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

David Santiso

Sunday 20 March 2011 8:18:44 am

Ok. Thanks ;)

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 29 2025 14:42:53
Script start
Timing: Jan 29 2025 14:42:53
Module start 'layout'
Timing: Jan 29 2025 14:42:53
Module start 'content'
Timing: Jan 29 2025 14:42:53
Module end 'content'
Timing: Jan 29 2025 14:42:53
Script end

Main resources:

Total runtime0.0163 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.0062 588.1328151.2109
Module start 'layout' 0.00630.0026 739.343836.6563
Module start 'content' 0.00890.0057 776.000094.1875
Module end 'content' 0.01460.0016 870.187533.9766
Script end 0.0162  904.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.1337140.0002
Check MTime0.00116.5941140.0001
Mysql Total
Database connection0.00095.834810.0009
Mysqli_queries0.003018.385330.0010
Looping result0.00000.061610.0000
Template Total0.00137.910.0013
Template load0.00095.682310.0009
Template processing0.00042.190210.0004
Override
Cache load0.00063.849810.0006
General
dbfile0.00169.949980.0002
String conversion0.00000.036740.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