Empty Object relation list

Author Message

J-A Eberhard

Friday 29 April 2005 2:49:19 am

I have a custom made class for Lecturer that uses Object relation list to show the list of their publications. (Publications are another custom made class).
Lecturer can have a publication and it's working fine, the list is displayed. If there is no publication, I would like to test if there is no publication and not displaying the "publication box" altogether.
How can I test in /node/view/full if my Object Relation list is empty or not?
Thanks

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Eirik Alfstad Johansen

Saturday 30 April 2005 2:15:45 am

Hi J-A,

Do

{$node.data_map.identificator_of_your_object_relation_attribute|attribute(show)}

To look for appropriate values to test against. Then, do a {section show=condition}{/section}.

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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 20 2025 05:09:35
Script start
Timing: Jan 20 2025 05:09:35
Module start 'layout'
Timing: Jan 20 2025 05:09:35
Module start 'content'
Timing: Jan 20 2025 05:09:36
Module end 'content'
Timing: Jan 20 2025 05:09:36
Script end

Main resources:

Total runtime0.8739 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1563152.6250
Module start 'layout' 0.00560.0037 741.781339.4453
Module start 'content' 0.00930.8630 781.2266530.4844
Module end 'content' 0.87230.0015 1,311.71098.1641
Script end 0.8738  1,319.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3507160.0002
Check MTime0.00140.1579160.0001
Mysql Total
Database connection0.00160.183310.0016
Mysqli_queries0.824294.3125540.0153
Looping result0.00060.0661520.0000
Template Total0.838596.020.4193
Template load0.00180.208620.0009
Template processing0.836795.746920.4183
Template load and register function0.00010.012310.0001
states
state_id_array0.00180.203110.0018
state_identifier_array0.00110.126220.0006
Override
Cache load0.00140.1635140.0001
Sytem overhead
Fetch class attribute can translate value0.00130.154220.0007
Fetch class attribute name0.00140.165140.0004
XML
Image XML parsing0.00130.146620.0006
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00290.3295210.0001
String conversion0.00000.000940.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs