| elaheh tabbakh maher
                                                                                                                             | Sunday 08 March 2009 10:35:18 am 
                                                                 
Hi,I am using the double_top.tpl with topdrop extension and the code for showing the first level is as follow and I am not sure where in that code should be changed with your suggestion:
 ------------------------------------
 
{def $base=fetch( 'content', 'node', hash( 'node_id', 2 ) )} {* FIRST LEVEL *} {def $i=0} {section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} {let child_check=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} {set $i=inc( $i )} <li><a class="{concat('menu_',$i)}" href={$:item.url_alias|ezurl}>{$:item.name}
 {section show=$child_check|count|gt(0)} 
	{* SECOND LEVEL *}<!--[if IE 7]><!--></a><!--<![endif]-->
 ------------------------------------------------------------------------------------------------
 Thank you | 
                                                                                                    
                                                        | Jean-Yves Zinsou
                                                                                                                             | Sunday 08 March 2009 10:58:25 am 
                                                                 I am not very familiar with the section loop but this is where i would put it...  
{def $base=fetch( 'content', 'node', hash( 'node_id', 2 ) )} 
{* FIRST LEVEL *} 
{def $i=0}
 {section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} 
{*-----------your checking here start-------------*}
{if $folders_to_display|contains($:item.node_id)}
{let child_check=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} {set $i=inc( $i )}
<li><a class="{concat('menu_',$i)}" href={$:item.url_alias|ezurl}>{$:item.name}
{section show=$child_check|count|gt(0)}
{* SECOND LEVEL *}
<!--[if IE 7]><!--></a><!--<![endif]-->
{/section}
{*-----------your checking here end------------*}
{/end if}
{/section}
Do Androids Dream of Electric Sheep?I dream of eZpubliSheep....
 ------------------------------------------------------------------------
 http://www.alma.fr
 | 
                                                                                                    
                                                        | Jean-Yves Zinsou
                                                                                                                             | Friday 13 March 2009 5:01:40 am 
                                                                 Hi , it is because it was not clear enough. 
The code you gave is incomplete ,
 
{def $base=fetch( 'content', 'node', hash( 'node_id', 2 ) )} {* FIRST LEVEL *} {def $i=0} {section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} {let child_check=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} {set $i=inc( $i )}
<li><a class="{concat('menu_',$i)}" href={$:item.url_alias|ezurl}>{$:item.name}
{section show=$child_check|count|gt(0)}
{* SECOND LEVEL *}
<!--[if IE 7]><!--></a><!--<![endif]-->
{*code missing here there should be a /section somewhere*}
 in fact you have to replace the code section you gave with  
{def $base=fetch( 'content', 'node', hash( 'node_id', 2 ) )} 
{* FIRST LEVEL *} 
{def $i=0}
 {section loop=fetch(content,list,hash(parent_node_id,$top_cat, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} 
{*-----------your checking here start-------------*}
{if $folders_to_display|contains($:item.node_id)}
{let child_check=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 38, 39),sort_by,$base.sort_array))} {set $i=inc( $i )}
 
<li><a class="{concat('menu_',$i)}" href={$:item.url_alias|ezurl}>{$:item.name}
{section show=$child_check|count|gt(0)}
{* SECOND LEVEL *}
<!--[if IE 7]><!--></a><!--<![endif]-->
Then find the next {/section} tagand add
 
{/end if}
after it 
Sorry, things that may be obvious for one, may not be to others.My apologies.
 
Hope this really helps this time ;-)Jey
 Do Androids Dream of Electric Sheep?I dream of eZpubliSheep....
 ------------------------------------------------------------------------
 http://www.alma.fr
 |