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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 11:50:51
Script start
Timing: Jan 19 2025 11:50:51
Module start 'layout'
Timing: Jan 19 2025 11:50:51
Module start 'content'
Timing: Jan 19 2025 11:50:51
Module end 'content'
Timing: Jan 19 2025 11:50:51
Script end

Main resources:

Total runtime0.0158 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 590.4297152.6250
Module start 'layout' 0.00600.0027 743.054739.4453
Module start 'content' 0.00870.0050 782.500089.3359
Module end 'content' 0.01370.0020 871.835930.3047
Script end 0.0158  902.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002717.3161140.0002
Check MTime0.00127.3285140.0001
Mysql Total
Database connection0.00095.766510.0009
Mysqli_queries0.002515.730030.0008
Looping result0.00000.063410.0000
Template Total0.001610.210.0016
Template load0.00095.697110.0009
Template processing0.00074.494310.0007
Override
Cache load0.00074.139610.0007
General
dbfile0.00031.791480.0000
String conversion0.00000.031740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs