Forums / Developer / More filtering / Comment44487

Author Topic

Pål Messenlien

Friday 21 October 2005 1:49:02 am

Comment44487

Got it working thanks to Kristian Hole. Istead of doing the check in the fetch i use a if sentence instead. The working code ended up like this:

{def $meny_elementer=fetch('content','list',
				hash('parent_node_id', 2,
				'class_filter_type',  'include',
               'class_filter_array', array( 'folder' ),
				'sort_by',        array( 'priority', true() )
				))}
	

	{foreach $meny_elementer as $meny_element}
		{if and( is_set( $meny_element.data_map.vis_meny), $meny_element.data_map.vis_meny.content) )}
		<a href={$meny_element.url|ezurl}>
			{$meny_element.name}
		</a>
		{if}
	{/foreach}

--------------------------------------------
Høgskolen i Lillehammer
Lillehammer University College
http://www.hil.no
--------------------------------------------
Messenlien IT
http://messenlien.com
-------------------------------------------