How to display a URL for a class member?

Author Message

Andrew Zahra

Wednesday 11 February 2004 8:24:29 pm

I have defined my own class to represent a diagram. As a first step I am trying to customise the display of this class. Eventually I would like to display it inline as part of a larger article. But for starters I thought I would try and customise the display of an individual object of this class.

I have been guessing my way around the templates from the standard ones. Is there any documentation that explains the variables that are automatically populated for a template and their structure? For example, I have deduced that there is a $node and that I can do a $node.object.data_map.<fieldname> where <fieldname> is the field from the class. But is there some docuemntation that describes the $node in detail so I know what all the fields are.

So far I have attempted this as my template. The name and image display correctly, but the URL is completely wrong. I want it to be a link to the binary file (source) in the object.

<div class="pagetitle">
{* Display Name as title. *}
{attribute_view_gui attribute=$node.object.data_map.name}
</div>
<div class="imageleft">
{* Display diagram image. *}
{attribute_view_gui attribute=$node.object.data_map.image}
</div>
{* Display diagram source. *}
<a href={$node.object.data_map.source|ezurl}>{$node.object.data_map.name}</a>

Tore Skobba

Thursday 12 February 2004 2:24:48 am

Hi

For your url you could do: attribute_view_gui attribute=$node.object.data_map.source}. in order to view all attributes for any variable do {$node|attribute(show)}, where $node is the variable you are wondring about.

Tore

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 31 2025 06:20:32
Script start
Timing: Jan 31 2025 06:20:32
Module start 'layout'
Timing: Jan 31 2025 06:20:32
Module start 'content'
Timing: Jan 31 2025 06:20:33
Module end 'content'
Timing: Jan 31 2025 06:20:33
Script end

Main resources:

Total runtime1.0789 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.0061 588.2500151.2266
Module start 'layout' 0.00610.0034 739.476636.6797
Module start 'content' 0.00951.0684 776.1563882.9922
Module end 'content' 1.07790.0010 1,659.14847.8125
Script end 1.0789  1,666.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2884160.0002
Check MTime0.00130.1198160.0001
Mysql Total
Database connection0.00090.078810.0009
Mysqli_queries1.035295.9495540.0192
Looping result0.00040.0409520.0000
Template Total1.043196.720.5216
Template load0.00200.186820.0010
Template processing1.041196.494820.5205
Template load and register function0.00130.120610.0013
states
state_id_array0.00180.171410.0018
state_identifier_array0.00170.159920.0009
Override
Cache load0.00160.1513200.0001
Sytem overhead
Fetch class attribute can translate value0.00060.051820.0003
Fetch class attribute name0.00200.181420.0010
XML
Image XML parsing0.00020.021520.0001
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00070.0611100.0001
String conversion0.00000.000640.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.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/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs