Forums / Setup & design / drop down list navigation

drop down list navigation

Author Message

Ahmed Moharram

Monday 24 January 2005 3:41:09 am

hi all,
i am still new to ez, and i need help

I have many pages of articles and I want to show a navigator as a drop down list that contains pages numbers.

any idea?

Arran Price

Tuesday 25 January 2005 4:54:38 pm

You should be able to fetch all of the articles in your folder and use the appropriate sort_by to get them in order, eg priority or published etc.

Once you have the fetch results you should be able populate your drop down with those results.

Some example code for our drop down nav, which is fetching on priority, is shown below.

{set menu_items=fetch( 'content', 'list', 
               			hash( 'parent_node_id', 119,
               			      sort_by, array( priority, true ),
               			     )
      			      )    
            }         
          
            <ul>
               {section loop=$menu_items}
               	<li><a href={$item.url_alias|ezurl}>{attribute_view_gui attribute=$item.object.data_map.short_name}</a></li>
               {/section}            
            </ul>

the code obviously dosent have the drop down javascript in it or the stylesheet entries, but may be of some help. You can use index or item for the numbering.

cheers

Arran

Ahmed Moharram

Sunday 30 January 2005 1:10:51 am

thanks alot
that was of a great help
thanks