Claus Jensen
|
Tuesday 02 September 2003 3:50:09 am
Hi folks, eZ wont write out my attribute. I've tried so many different ways, but it just dont wont do it. Here's the code: {section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1),sort_by,array(array(priority))))}
<strong>{$:item.name|wash}</strong> As you can see im looping through some objects, and instead of $:item.name i want to write out an attribute called menu_title, so i have tried: $:item.data_map.menu_title, $:item.object.data_map.menu_title and a lot more.
Also this is not working, i want to display only objects that dont have node_id = 131, should it not be like this?
{section show=not(eq($:item.node_id, 131)))} {/section}
Please help me, thanks. claÜs
|
Claus Jensen
|
Tuesday 02 September 2003 6:33:11 am
Oki, i figured the first part. I can do a {attribute_view_gui attribute=$:item.data_map.menu_title} or a {$:item.data_map.menu_title.data_text} but i still have problems with the not() function how should it be used? the sdk explains this bad I think (http://ez.no/sdk/eztemplate/view/operator_list/)...
Anybody knows this?
cheers, claÜs
|
Bjørn Kaarstein
|
Tuesday 02 September 2003 6:39:02 am
You might want to try {$:item|attribute(show)} or {$:item.data_map|attribute(show)}. Also I would check the rights of the anonymous user. If you've created a new class, the anonymous user won't have the right to read it.. (I've burnt myself on this several times) Try to give your section a name=test, so you can access the $test:item.... from the nested section. I think your {section show} can be written like this: {section show=ne($test:item.node_id, 131)} {/section}
or you could use a switch/case statement: http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/functions/switch Hope this helps. Regards Bjørn
|