Share » Forums » Setup & design » Object relations (datatype) does it...

Object relations (datatype) does it work?

Object relations (datatype) does it work?

Tuesday 08 April 2003 11:18:43 pm - 3 replies

Author Message

Bård Farstad

Friday 11 April 2003 6:55:13 am

Object relations does work in 3.0. You can see it in action here at ez.no. The "last forum messages", banners and "latest news" are all embeded related objects.

If you take a look at the standard templates, full.tpl, you will see that there is a block for the related objects. This block will show all objects which is related to the current object.

--bård

Documentation: http://ez.no/doc

Atle Enersen

Monday 14 April 2003 2:23:35 am

Well, I actually did that, and I did it again just to ensure that I did'nt do any mistakes. It still is'nt working. This is (one of the) code(s) used...:

{default content_version=$node.contentobject_version_object
node_name=$node.name}
....

{section name=Object loop=$content_version.related_contentobject_array show=$content_version.related_contentobject_array}
<div class="block">
{content_view_gui view=text_linked content_version=$Object:item}
</div>
{/section}

\atle\
--

Bård Farstad

Monday 14 April 2003 2:40:57 am

Try this:

{section name=Related loop=$node.object.related_contentobject_array}
{$Related:item.name}
{/section}

It should work, if you put it in your override for full.tpl. I just tested it with my installation. I used it in full_class_1.tpl.

--bård

Documentation: http://ez.no/doc

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

36 542 Users on board!

Forums menu