Share » Forums » Setup & design » Displaying related objects of...

Displaying related objects of self-made classes

Displaying related objects of self-made classes

Wednesday 02 March 2005 4:45:55 am - 6 replies

Modified on Wednesday 02 March 2005 4:55:09 am by Bjørn Torkel Dahl

Author Message

Łukasz Serwatka

Wednesday 02 March 2005 5:06:27 am

Hi Bjørn,

You can view list of related objects to article using attribute_view_gui
For example:

{*img_list is object relation list*}
{attribute_view_gui attribute=$node.object.data_map.img_list}

Look also into design/standard/templates/content/datatype/view/ezobjectrelationlist.tpl to see how it works.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Bjørn Torkel Dahl

Wednesday 02 March 2005 6:04:53 am

Hi

Are you saying that a list of related object always will be found in img_list regardless of object class?

--
btd

Gabriel Ambuehl

Wednesday 02 March 2005 6:15:48 am

img_list is the name of his attribute. You must use yours.

Visit http://triligon.org

Bjørn Torkel Dahl

Wednesday 02 March 2005 6:56:28 am

Obviously :) The attribute dumps were quite a lot to read through.

tnx guys.

--
btd

Bjørn Torkel Dahl

Wednesday 02 March 2005 7:28:30 am

And btw, when you include as mentioned over, wich template is used? It does not seem to use the "full" template in my case, I only get a title listing... (i figured this one out.. using "embed" seemed logical, and was, as most of eZ is :>)

That worked ok, but what if the object is just added as a related object? Not in an object relation list, and hence with no name?

--
btd

Roy Bøhmer

Thursday 03 March 2005 11:39:56 pm

I've used object relation list as a way to relate articles. What I found was that when two articles both were related to each other, eZ somehow got a hickup and messed up the whole relation-list.

Ex.:
Article_1 have Article_2 in its object relation list
Aritlce_2 have Article_1 in its object relation list

Have you tested your solution for this?

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu