Share » Forums » Developer » How to get the selection attribute name

How to get the selection attribute name

How to get the selection attribute name

Wednesday 29 September 2010 2:43:37 am - 6 replies

Author Message

Matthieu Sévère

Wednesday 29 September 2010 2:54:54 am

Hi Romeo,

You'll need to fetch the content class attribute and then fetch the name matching your IDs 0,1,2,3 ..

See there to get the class matching your current object : http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Objects/ezcontentobjecttreenode

--
eZ certified developer: http://ez.no/certification/verify/346216

Romeo Antony

Wednesday 29 September 2010 3:14:06 am

Thanks for the reply.

that means do I need to code some conditions like if the value of array is 0 then print a name
if valuse is 2 then print next name

i have got an alternative solution by

{attribute_view_gui attribute=$valid_nodes[0].object.data_map.selection attribute}

Matthieu Sévère

Wednesday 29 September 2010 3:25:11 am

Your alternative solution is the good one. It calls the template content/datatype/view/ezselection.tpl you should have a look at this template to understand the mechanism

--
eZ certified developer: http://ez.no/certification/verify/346216

Romeo Antony

Wednesday 29 September 2010 4:16:49 am

ya. I will try that .

Sorry to bother you again. A small doubt .

I need to display nodes in dynamic block. Only the nodes tthas has a specific selection attribute value will be only fetched. For that any idea what attribute filter should I set in fetch class or do

Can u please give me suggetion.

Matthieu Sévère

Wednesday 29 September 2010 4:27:07 am

ya. I will try that .

Sorry to bother you again. A small doubt .

I need to display nodes in dynamic block. Only the nodes tthas has a specific selection attribute value will be only fetched. For that any idea what attribute filter should I set in fetch class or do

Can u please give me suggetion.

You need to give the id, like array('your_class/your_attribute','=',1)

--
eZ certified developer: http://ez.no/certification/verify/346216

Romeo Antony

Wednesday 29 September 2010 4:34:31 am

Alright. I got it.

Thanks a lot Matthieu.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu