Theme switcher

BTdotorg

Menu templates for the extmenu Core block

This page describes menu templates created for the extmenu block.

The menus consist of templates, styles and images. The menus are installed in the /config/styles/Blocks and /config/templates/Blocks directories as module overrides and images in /images/menu/horizontal and /images/menu/vertical. In that way they are kept together and will not be overwritten with an update. The demonstration and description pages are installed in /docs.

Installation

  • Download the extmenu package
  • Unpack in your Zikula installation (files will be installed in /config, /images/menu and /docs)
  • For a vertical menu:
    • Create a new extmenu block (or use your existing extmenu block)
    • Choose the blocks_block_extmenu_vertical.htm template and the theme design (e.g. vertical1.css) that is right for you. This has to be done by typing the just the names in the template and stylesheet field in the admin part of Extmenu.
    • Assign the new block to the right blockposition, like left or right.
    • Add new menu items to your menu if needed. When you have EDIT rights you will get the "Add current URL" and "Edit this block" links automatically as extra menu items.
  • For a horizontal menu:
    • Create a new blockposition (for example navtop) in the Block administration ( http://www.yoursite.com/index.php?module=Blocks&type=admin&func=newposition )
    • Assign a block template to the new block position. This can be a new block template YourTheme/templates/bocks/navblock.htm specific for the menu, like the following.
      <!-- Nav Block Start -->
      <!--[$content]-->
      <!-- Nav Block End -->
    • Make sure the blockposition is used in your theme templates, So in the part of the theme template where you want to display the menu make sure you put the blockposition specification there. In BlankTheme for example this is below the page header in a separate div:
      <!--[blockposition name='navtop']-->
      <div id="page_margins">
      	<div id="page">
      		<div id="header">
                          HEADER
      		</div>
      		<!-- begin: main navigation #nav -->
      		<div id="nav"> <a id="navigation" name="navigation"></a>
      			<!--[blockposition name='navtop']-->
      		</div>
      ...
    • Create a new block (or use your existing extmenu block) and assign it to the newly created blockposition navtop
    • Choose the blocks_block_extmenu_horizontal.htm template and the theme design (e.g. horizontal10.css) that is right for you.
    • Add or edit menu items if needed. When you have EDIT rights you will get the "Add Current URL" and "Edit this block" links automatically as extra menu items. When you dont want these extra links, you can edit the template (/config/templates/Blocks/blocks_block_extmenu_vertical.htm) and remove the following lines, that are meant for displaying the extra menu items.
      <!--[if $access_edit]-->
       <li><a href="<!--[pnmodurl modname=Blocks type=admin func=modify bid=$blockinfo.bid addurl=1]-->#editmenu" title="<!--[pnml name='_EMENU_ADDCURRENTURL']-->"><em>*<!--[pnml name='_EMENU_ADDCURRENTURLSHORT']--></em></a></li>
       <li><a href="<!--[pnmodurl modname=Blocks type=admin func=modify bid=$blockinfo.bid fromblock=1]-->" title="<!--[pnml name='_EMENU_EDITTHISBLOCK']-->"><em>*<!--[pnml name='_EMENU_EDITTHISBLOCK']--></em></a></li>
      <!--[/if]-->

Ready menus and their original source

Vertical 1 level menus (vertical1 - vertical23)

Horizontal 1 level menus (horizontal1 - horizontal24)

The following menus are in the planning

Centered Horizontal 1 level menus


Erik Spaan

Comments

Only logged in users are allowed to comment. register/log in