Forums / General / ezselection - how to display data

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

eZ debug

Timing: Jan 18 2025 20:57:10
Script start
Timing: Jan 18 2025 20:57:10
Module start 'content'
Timing: Jan 18 2025 20:57:10
Module end 'content'
Timing: Jan 18 2025 20:57:10
Script end

Main resources:

Total runtime0.0198 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.7031180.8438
Module start 'content' 0.00540.0047 768.5469101.9766
Module end 'content' 0.01010.0096 870.523478.7031
Script end 0.0197  949.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002110.4838120.0002
Check MTime0.00105.0750120.0001
Mysql Total
Database connection0.00062.891210.0006
Mysqli_queries0.002512.815840.0006
Looping result0.00000.075920.0000
Template Total0.009347.010.0093
Template load0.00073.487810.0007
Template processing0.008643.481210.0086
Override
Cache load0.00052.381410.0005
General
dbfile0.003517.6666100.0003
String conversion0.00000.031330.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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