Forums / Setup & design / How to display a URL for a class member?

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

eZ debug

Timing: Jan 18 2025 22:31:33
Script start
Timing: Jan 18 2025 22:31:33
Module start 'content'
Timing: Jan 18 2025 22:31:34
Module end 'content'
Timing: Jan 18 2025 22:31:34
Script end

Main resources:

Total runtime0.8363 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 588.9609180.8281
Module start 'content' 0.00920.6924 769.7891464.8516
Module end 'content' 0.70170.1345 1,234.6406333.4688
Script end 0.8362  1,568.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5170210.0002
Check MTime0.00160.1894210.0001
Mysql Total
Database connection0.00160.196510.0016
Mysqli_queries0.770392.10601910.0040
Looping result0.00200.23601890.0000
Template Total0.798195.420.3990
Template load0.00220.258920.0011
Template processing0.795995.170320.3979
Template load and register function0.00020.018010.0002
states
state_id_array0.00190.222110.0019
state_identifier_array0.00130.151720.0006
Override
Cache load0.00170.2080200.0001
Sytem overhead
Fetch class attribute can translate value0.00290.341830.0010
Fetch class attribute name0.00120.139520.0006
XML
Image XML parsing0.00070.079330.0002
class_abstraction
Instantiating content class attribute0.00000.001020.0000
General
dbfile0.00140.1638210.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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