Automatic object relation / keyword

Author Message

Dominik Stoeppel

Wednesday 26 November 2003 4:13:45 am

hi,

i add the datatype keyword to a class and make changes in templates like this :
http://ez.no/developer/ez_publish_3/documentation/customization/components/datatypes/ezkeyword/automatic_object_relation,
,but nothing is shown .

What can I do?

Marco Zinn

Wednesday 26 November 2003 2:58:30 pm

Do you have data?
I think, the automatic object relation compares the data in the keyword fields, so just changing classes and templates will do not much.
Enter the same keyword in at least 2 objects of your class and see, if the "relate automatically".

Marco
http://www.hyperroad-design.com

Dominik Stoeppel

Wednesday 03 December 2003 2:11:00 am

thx for your answer.

In my template was an error. Now I see the links to other articles with the same keyword.

But there is a new problem. I see the links only one time. After clicking on it, they disappear.

After clearing the cache they comes back.

very strange

the class has the dataype keyword, called "Stichwort"

I add this to my pagelyout_dienstleistung.tpl. Or can I use this only in the template for this class ?

{let related=$node.object.data_map.stichwort.content.related_objects} {section show=$related} {section name=Related loop=$related} {$:item.name} {/section} {/section} {/let}

Paul Borgermans

Wednesday 03 December 2003 6:28:53 am

When using this in the pagelayout instead of the view templates for classes, you need to fetch the $node variable using an explicit fetch first.

eg:

{let mynode=fetch( 'content', 'node', hash(node_id,$module_result.node_id)
related=$mynode.object.data_map.stichwort.content.related_objects} {section show=$related} {section name=Related loop=$related} {$:item.name} {/section} {/section} {/let}

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Dominik Stoeppel

Thursday 04 December 2003 4:25:30 am

hi paul,

thank you for helping, but nothing is shown after this changes. :-(

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.