ezselection - how to display data

Author Message

Łukasz Serwatka

Monday 06 December 2004 6:20:41 am

Hi,

One of my class attributes is ezselection datatype (no multiple choices)

{attribute_view_gui attribute=$node.object.data_map.attr_name} - this works, but I need add result of this {attribute_view_gui attribute=$node.object.data_map.attr_name}

to url

<a href={concat($DesignKeys:used.url_alias, "/(lang)/", 
$view_parameters.lang, "/(type)/", 
attribute_view_gui attribute=$:item.object.data_map.attr_name)|ezurl}>

I don`t know how?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Łukasz Serwatka

Monday 06 December 2004 11:38:28 pm

Nobody know how to do this?

Thanks for any help or suggestion.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Bruce Morrison

Tuesday 07 December 2004 12:01:55 am

I find it best to look at the data type view templates in the standard design to work out how these types of things work.

The file design/standard/templates/content/datatype/view/ezselection.tpl should give you some clues.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Łukasz Serwatka

Tuesday 07 December 2004 12:05:00 am

Hi Bruce,

The file 
design/standard/templates/content/datatype/view/ezselection.tpl 
should give you some clues.

Yes, I aslo find this code, but I must use sections. Maybe is easily way to display this value? If not, I must use it :/

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Bruce Morrison

Tuesday 07 December 2004 2:55:01 am

This should do the trick:

<a href={concat($DesignKeys:used.url_alias, "/(lang)/", 
$view_parameters.lang, "/(type)/",$:item.object.data_map.attr_name.contentclass_attribute.content.options[$:item.object.data_map.attr_name.content[0]].name
)|ezurl}>

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Łukasz Serwatka

Tuesday 07 December 2004 11:22:52 am

Hi Bruce,

This is a key. I was close, but you was faster ;-)

Thank you for your help.

Greetings

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

Main resources:

Total runtime1.3894 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.9063152.6250
Module start 'layout' 0.00530.0030 740.531339.4453
Module start 'content' 0.00831.3791 779.9766583.4922
Module end 'content' 1.38740.0020 1,363.468816.1563
Script end 1.3894  1,379.6250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2425160.0002
Check MTime0.00130.0940160.0001
Mysql Total
Database connection0.00070.050010.0007
Mysqli_queries1.321195.0822660.0200
Looping result0.00070.0512640.0000
Template Total1.358497.820.6792
Template load0.00240.172620.0012
Template processing1.356097.590820.6780
Template load and register function0.00010.006810.0001
states
state_id_array0.00110.080210.0011
state_identifier_array0.00060.043820.0003
Override
Cache load0.00200.1474370.0001
Sytem overhead
Fetch class attribute can translate value0.00060.044620.0003
Fetch class attribute name0.00100.072180.0001
XML
Image XML parsing0.00110.081420.0006
class_abstraction
Instantiating content class attribute0.00000.0022120.0000
General
dbfile0.00120.0838240.0000
String conversion0.00000.000540.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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: 29
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs