Can't find value of an ezselection datatype

Author Message

Thomas Brandl

Wednesday 24 September 2003 2:14:47 am

Hi,

I trying to display a list of objects containing a selection datatype value. I cannot find this value anywhere under data_map!!

{$node.0.data_map.myoptionlist.content} i.e seems to contain the index within the option list, I can't find it's 'real' value though!

Any clues?
thanks!
t

Thomas Brandl

Thursday 25 September 2003 2:49:34 am

Sorry to bother, but I need this!
Nobody ever displayed a selection value?? Noone?

Paul Forsyth

Thursday 25 September 2003 2:51:54 am

Have you tried the usual:

{$node.0.data_map.myoptionlist|attribute(show)}

paul

Thomas Brandl

Thursday 25 September 2003 4:34:29 am

Well, that's another problem I have.
{$:item|attribute(show)} works but when I try to list any other objects/arrays below that, I get a blank site or a timeout:
{$:item.data_map|attribute(show)} -> blank site
{$:item.object|attribute(show)} -> timeout

BUT: I found it. Using {attribute_view_gui} made it! I was trying to access it with {$node.data_map.myoptionlist.xy}, which works for most datatypes, but not for selection!

Thanks Paul!
t

Paul Forsyth

Thursday 25 September 2003 4:41:53 am

I often find i resort to looking at the ez templates to see how they do it :)

Look at this:

design/standard/templates/content/datatype/view/ezselection.tpl

This is the code used when {attribute_view_gui} is called.

Paul

Thomas Brandl

Thursday 25 September 2003 8:53:29 am

Yep, that I did, thinking "how the hell are they doing it" before I stopped realizing "shouldn't attribute_view_gui display just that ver template!? Yes, it should!

Too much computer work makes one so narrow-minded...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.