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.

eZ debug

Timing: Jan 19 2025 07:01:51
Script start
Timing: Jan 19 2025 07:01:51
Module start 'layout'
Timing: Jan 19 2025 07:01:51
Module start 'content'
Timing: Jan 19 2025 07:01:52
Module end 'content'
Timing: Jan 19 2025 07:01:52
Script end

Main resources:

Total runtime1.0347 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.1797152.6250
Module start 'layout' 0.00630.0041 741.804739.4453
Module start 'content' 0.01041.0228 781.2500599.8281
Module end 'content' 1.03320.0014 1,381.078112.1563
Script end 1.0346  1,393.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3051160.0002
Check MTime0.00140.1315160.0001
Mysql Total
Database connection0.00120.112110.0012
Mysqli_queries0.972493.9805650.0150
Looping result0.00060.0601630.0000
Template Total1.000096.620.5000
Template load0.00200.195420.0010
Template processing0.998096.451320.4990
Template load and register function0.00040.037510.0004
states
state_id_array0.00080.075310.0008
state_identifier_array0.00120.111720.0006
Override
Cache load0.00170.1668330.0001
Sytem overhead
Fetch class attribute can translate value0.00060.053630.0002
Fetch class attribute name0.00200.191270.0003
XML
Image XML parsing0.00110.107730.0004
class_abstraction
Instantiating content class attribute0.00000.001570.0000
General
dbfile0.00230.2245230.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs