Wednesday 27 September 2006 7:53:43 am
Hello David You might want to use def $menu_items... instead of set, but this depends on whether you have def'ed the variable menu_items somewhere before in your template. Anyway you should use a $ in front of the variable. There is also a comma to much and the parentheses for the true() are missing (although I am not sure whether one needs them). Just use foreach to go through the loop, that makes it easier to understand. If the attribute short_name of your items is a text lien you just can use the content of this attribute, no need to use the attribute_view_gui function. If you need it, just replace the inner html of the a href with your code again.
{def $menu_items = fetch('content', 'list', hash('parent_node_id', 2,
'sort_by', array('priority', true())))}
{foreach $menu_items as $item}
<li>
<a href={$item.url_alias|ezurl}>{$item.object.data_map.short_name.content|wash()} </a>
</li>
{/foreach}
(the code is not tested and will most likely contain some typos) I am pretty sure that you got some messages in the debug output, next time please have alook there first and post the error messages if necessary. Greetings from Luxembourg Claudia
|