Show Related Objects from one identifier

Author Message

Martin Sanders

Friday 20 July 2007 4:27:35 am

Hi, I have two separate ezcontentobject’s identifiers in the same class, within the template I would like to show colour information and security info within separate areas using the identities to indicate which area to place the content.

At the moment all related object are shown within a single template area so would like to know how I’d go about filtering the ezcontentobject fetch so content can be presented within designated template areas.

Current code users:

{* Fetch all the related objects from the node that is being viewed *}
{def $right_column_link=fetch('content','related_objects',hash('object_id', $node.object.id, 'all_relations', true()))}

{* Foreach related teacher, show the attributes *}
{foreach $right_column_link as $content_object}
	<strong>{attribute_view_gui attribute=$content_object.main_node.data_map.name}</strong>
	{attribute_view_gui attribute=$content_object.main_node.data_map.content}

{/foreach}

{undef}

<i>http://www.brandnewdesigns.co.uk/eng/products/h2_ticket_flyer</i>

Ekkehard Dörre

Friday 27 July 2007 10:17:12 am

Hi,

look here, what you can do:

http://ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/related_objects

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

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 00:30:17
Script start
Timing: Jan 19 2025 00:30:17
Module start 'layout'
Timing: Jan 19 2025 00:30:17
Module start 'content'
Timing: Jan 19 2025 00:30:17
Module end 'content'
Timing: Jan 19 2025 00:30:17
Script end

Main resources:

Total runtime0.0261 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.0135 589.1797152.6406
Module start 'layout' 0.01350.0035 741.820339.4766
Module start 'content' 0.01710.0064 781.296989.3984
Module end 'content' 0.02340.0026 870.695330.3047
Script end 0.0260  901.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.1368140.0002
Check MTime0.00114.0869140.0001
Mysql Total
Database connection0.00155.721710.0015
Mysqli_queries0.009034.421330.0030
Looping result0.00000.096010.0000
Template Total0.00207.810.0020
Template load0.00134.931710.0013
Template processing0.00072.868110.0007
Override
Cache load0.00072.595710.0007
General
dbfile0.00145.321280.0002
String conversion0.00000.045740.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