Forums / Setup & design / Current dropdown menu (top menu) for ezflow?

Current dropdown menu (top menu) for ezflow?

Author Message

Marco Zinn

Wednesday 06 July 2011 11:14:01 am

Hi there,

i wonder, if there is any current project, that provides a current dropdown menu, which includes with the current ezflow or ezwebin template set.

I mean: CSS menu, none or very little JS, supporting all current major browsers (incl. our friend IE).

It's quite a shame, that the current templates shipped with ez do not provide a dropdown menu... but I also cannot see or find a current project/extension about this..

The only thing, that i know of, if the 2009 "topdrop" project: http://projects.ez.no/css_dropdown_top_menu . But that fails in IE9 (at least)

Marco
http://www.hyperroad-design.com

Sandra Parente

Thursday 07 July 2011 1:02:24 am

Hi Marco,

I took the tpl and css of the dropdownmenu extension and put it directly in ezwebin to make it work with ezflow. After some testing I succeded to make it work on IE8 (not yet tested on IE9, still underco):

 <!--double_top.tpl--> 
{*
Here we are going to generate some code with ul/li hierarchy A stylesheet called dropdown.css is also necessary to create the 
menu. Of course, it can be modified Only Folder are shown in the menu. This can be changed by adding the id of the class which you want to put into 
it. For example, replace array(1) by array(1,2) for each fetch functions if you want to show folders and Articles in each levels.
*}
{def $goleft=ezini( 'TopDrop', 'goleft', 'design.ini')} 
{let top_cat=2 used_node=false()}
{set used_node=2}
    
<center>
<div class="menu"><ul> {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]-->
    <!--[if IE 8]><!--></a><!--<![endif]-->
    <table><tbody><tr><td>
    {if $i|gt( $goleft )}
        <ul class="endstop">
    {else}
        <ul>
    {/if}
        {section loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 39),sort_by,$:item.sort_array))}
        {let child_check1=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 19, 20, 23, 39),sort_by,$:item.sort_array))}
              <li><a {section show=$child_check1|count|gt(0)}class="drop"{/section} href={$:item.url_alias|ezurl}>{$:item.name}
          
{section show=$child_check1|count|gt(0)}
                
        {* THIRD LEVEL *}
        <!--[if IE 7]><!--></a><!--<![endif]-->
        <!--[if IE 8]><!--></a><!--<![endif]-->
        <table><tbody><tr><td>
        {if $i|gt( $goleft )}
            <ul class="left">
        {else}
            <ul>
        {/if}
            {section loop=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,$:item.sort_array))}
            {let child_check2=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,$:item.sort_array))}
            <li><a {section show=$child_check2|count|gt(0)}class="drop"{/section} href={$:item.url_alias|ezurl}>{$:item.name}

{section show=$child_check2|count|gt(0)}

            {* FOURTH LEVEL *}
            <!--[if IE 7]><!--></a><!--<![endif]-->
            <!--[if IE 8]><!--></a><!--<![endif]-->
            <table><tbody><tr><td>
            {if $i|gt( $goleft )}
                <ul class="left">
            {else}
                <ul>
            {/if}
                {section loop=fetch(content,list,hash(parent_node_id,$:item.node_id, class_filter_type, "include", class_filter_array, array(1, 16, 17, 20, 23, 39),sort_by,$:item.sort_array))}
                <li><a href={$:item.url_alias|ezurl}>{$:item.name}</a></li>
                {/section}
            </ul>
            </td></tr></tbody></table>
            <!--[if lte IE 6]></a><![endif]-->
            {section-else}
            </a>
            {/section}
            </li>
            {/let}    
            {/section}
        </ul>
        </td></tr></tbody></table>
        <!--[if lte IE 6]></a><![endif]-->
        {section-else}
        </a>
        {/section}  
        </li>
        {/let}    
        {/section}
    </ul>
    </td></tr></tbody></table>
    <!--[if lte IE 6]></a><![endif]-->
    <!--[if !IE]> --><!-- <![endif]-->
{section-else}
     </a>
{/section}
    
    </li>
    {/let}
    {/section}

{undef $i}
{undef $goleft}
{undef $base}
 </ul></div>

{/let}

Sandra Parente
www.netbliss.it

Sandra Parente

Thursday 07 July 2011 1:08:52 am

We have also commented all the TOPMENU divs in ezflow/stylesheets/pagelayout.css to show correctly the dropdown.css divs.

Sandra Parente
www.netbliss.it

eZ debug

Timing: Jan 17 2025 23:46:10
Script start
Timing: Jan 17 2025 23:46:10
Module start 'content'
Timing: Jan 17 2025 23:46:11
Module end 'content'
Timing: Jan 17 2025 23:46:11
Script end

Main resources:

Total runtime0.9680 sec
Peak memory usage4,096.0000 KB
Database Queries195

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 589.2734180.8203
Module start 'content' 0.00770.8161 770.0938567.5781
Module end 'content' 0.82370.1442 1,337.6719340.7422
Script end 0.9679  1,678.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4222210.0002
Check MTime0.00180.1888210.0001
Mysql Total
Database connection0.00160.166310.0016
Mysqli_queries0.897792.73701950.0046
Looping result0.00220.23171930.0000
Template Total0.940097.120.4700
Template load0.00220.226620.0011
Template processing0.937896.877920.4689
Template load and register function0.00010.012010.0001
states
state_id_array0.00040.043210.0004
state_identifier_array0.00060.062820.0003
Override
Cache load0.00160.1620180.0001
Sytem overhead
Fetch class attribute can translate value0.00150.156730.0005
Fetch class attribute name0.00150.157750.0003
XML
Image XML parsing0.00110.117130.0004
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00220.2272330.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs