`
haohappy2
  • 浏览: 331881 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

menu and submenu for joomla

阅读更多
There are a number of great improvements to menus in Joomla 1.5. These are focussed on providing more flexibility to template designers and making Joomla sites more accessible and W3C valid. Specifically, significant improvments have been made to bulleted lists to now allow better submenus (for things like dropdown menus) and image replacement.

Menu and Module Class suffixes

These control the appearance of menus. All of the menus use CSS in the template to style how they look. By carefully coding the CSS, the menuís appearance can be quickly and easily changed based on the suffixes used. An example of how this works might be different colored rounded boxes as shown below with our Joomlashack examples. These are four popular templates:

Menu Styles

There are two main ways to display your menu. One is to use a table for the layout (either vertical or horizontal) and the other is to use a bulleted list. In other tutorials I have discussed at length template design and how to make W3C valid websites. A big part of this is the subtle design differences between using tables or pure CSS for layout. This is getting technical, just know that you need to select whatever the template documentation calls for. Also, you can't have sublevels currently in 1.0.X with a flat list.

At the time of writing, Joomla 1.5 has legacy support for the previous way that a bulleted list was rendered (flat list) and a new way that allows more flexibility (list).

Thus there are currently 4 options:

  1. List - New method of showing a bulleted list
  2. Vertical - uses a vertical table
  3. Horizontal - uses a horizontal table
  4. Fat List - old method of showing a bulleted list

Submenus

Joomla has a feature where you can create submenus and they can be displayed in various ways. In the previous version of Joomla, it was not possible to have submenus if you were displaying your menu as a flat list. This was an issue as a bulleted list is a much more standards compliant method of displaying links.

In 1.5, this functionality is added to menus. It allows you to have submenus and flat lists. This is very important, as in the hands of a skilled template designer it allows you to do things like have dropdown menus and images for links without having to resort to JavaScript or tables, both of which are bad for accessibility, SEO and W3C compliance.

If "always show submenu items" is set to "yes" you get the out put shown below. Note that you MUST have the menu style selected as List.

<ul class="mainmenu">
<li class="level1 item1">
<a href="/">Services - Standard Layout</a>
</li>
<li class="level1 item2">
<a href="/">Services - Blog Layout</a>
</li>
<li class="level1 item3 parent">
<a href="/">About Us</a>

<ul>
<li class="level2 item1">
<a href="http://www.compassdesigns.net">Compass Design</a>
</li>
<li class="level2 item2">
<a href="http://www.joomlashack.com">Joomlashack</a>
</li>
</ul>

</li>
<li id="current" class="level1 item4 active">
<a href="/">Home</a>
</li>
</ul>

Notice the new output. There are multiple classes on the <li> tags allowing advanced templating.

This feature is very welcome to the flexibility of menus in Joomla. Thanks should be given to Louis Landry to working with the developer community to finalize these improvements. They are discussed further on his dev blog at the Joomla site.

 

ALL other useful information, please refer http://www.joomlashack.com/joomla-15

分享到:
评论

相关推荐

    android 选项菜单(此处为icon menu)--Menu,SubMenu,MenuItem的用法

    在本篇内容中,我们将深入探讨如何使用`Menu`, `SubMenu`, 和 `MenuItem`来创建和管理Android的图标选项菜单。 ### 1. Menu类 `Menu`是Android系统提供的接口,它表示一个抽象的菜单对象,可以包含多个菜单项。...

    asp.net下的vue与iview的多页界面,包含tab,menu,submenu控件

    asp.net下的vue与iview的多页界面,包含了栅栏界面只是,tab,Menu,submenu等高级控件

    crud-Menu-subMenu:个人项目,简单的Crud Menu子菜单

    这是可以使用Menu dan Submenu进行简单操作的Web服务。 两者之间的关系是一个菜单包含多个子菜单,但是一个子菜单仅存在于一个菜单上。该项目使用express.js和sequelize(postgreql)URL端点获取所有菜单...

    Submenu动态变化的小例子

    在Android中,菜单通常在`onCreateOptionsMenu`方法中创建,包括主菜单(Menu)和子菜单(Submenu)。在XML布局文件中定义菜单结构,例如`menu_main.xml`,然后在对应的Activity或Fragment中加载这个布局。 ```xml ...

    ActionBar在Android2.x的实现,类似新版微信界面

    ActionBar在Android2.x的实现,类似新版微信界面

    SubMenu的使用

    在`menu.xml`中,可以通过`&lt;menu&gt;`标签来定义顶级菜单,而`&lt;group&gt;`、`&lt;item&gt;`和`&lt;submenu&gt;`则分别用于定义分组、菜单项和子菜单。 创建SubMenu的基本步骤如下: 1. 在`menu.xml`文件中,使用`&lt;submenu&gt;`标签开始...

    Android---UI篇---Menu(菜单)

    本文将详细探讨Android系统中的三种菜单类型:Options Menu、Context Menu和SubMenu。 首先,我们来了解一下Options Menu,也称为主菜单。Options Menu是Android应用程序中最常见的菜单类型,通常在屏幕的顶部或...

    subMenu导航菜单实例(JQuery插件)

    【标题】:subMenu导航菜单实例(JQuery插件) 【描述】:subMenu导航菜单是一种常见的网页交互元素,尤其适用于构建多级导航系统。它利用JQuery这一强大的JavaScript库来实现动态效果,如滑动、淡入淡出等,为用户...

    Devexpress agmenu &agDataGrid8.2.8 for silverlight3.0

    AgMenu allows you to specify menu-level and submenu-level settings so you can enable common templates for items, sub-menu items and separators. Reading Menu Structure from XML Files - menu hierarchy...

    bootstrap-submenu

    Bootstrap Submenu是一款基于Bootstrap框架的插件,专为创建功能丰富的多级下拉菜单而设计。Bootstrap是一款广泛使用的前端开发框架,它提供了大量的预设样式、组件和JavaScript插件,帮助开发者快速构建响应式和...

    菜单,包括选项菜单,子菜单,上下文菜单

    首先,选项菜单(Option Menu)是最常见的菜单类型,通常位于屏幕的顶部或底部,作为应用的主要功能入口。用户可以通过点击屏幕右上角的三道横线(汉堡菜单)来打开它。创建选项菜单主要涉及在`res/menu`目录下定义...

    【ASP.NET编程知识】Element NavMenu导航菜单的使用方法.docx

    3._submenu 使用:Element NavMenu 支持submenu 的使用,submenu 可以嵌套使用,实现了菜单的层次结构。 4. 事件处理:Element NavMenu 提供了事件处理机制,可以在菜单项被选择时执行相应的事件处理函数。 5. 数据...

    android各组件详解- Menu

    根据应用场景的不同,Android系统提供了三种类型的菜单:OptionsMenu、ContextMenu以及SubMenu。 1. **OptionsMenu**:这是一种全局菜单,通常通过设备上的物理Menu键或屏幕上的虚拟按钮来触发,适用于当前Activity...

    jQuery子菜单插件Slight Submenu

    **jQuery子菜单插件Slight Submenu详解** jQuery子菜单插件Slight Submenu是一款针对网页导航菜单设计的工具,其主要目标是帮助开发者轻松创建和管理网站的下拉子菜单。这款插件以其高度可配置性和可扩展性著称,...

    Android MenuDemo Menu全面讲解

    另外,还可以通过`MenuInflater`和`SubMenu`来构建嵌套结构的Menu。 五、动态添加Menu项 在某些情况下,可能需要在运行时根据应用程序的状态动态地添加或移除Menu项。这可以通过在`onPrepareOptionsMenu(Menu menu)...

    Android Menu使用方法介绍

    submenu.add(0, R.id.sub_menu_item2, 0, "Sub Item 2"); return true; } ``` 这里我们先找到父菜单项`parent_menu_item`,然后通过`getSubMenu()`获取到子菜单,并添加了两个子菜单项。 #### 三、上下文菜单...

    Laravel开发-laravel-menu

    $menu-&gt;add('产品', function ($subMenu) { $subMenu-&gt;add('产品A', ['route' =&gt; 'product.a']); $subMenu-&gt;add('产品B', ['route' =&gt; 'product.b']); }); ``` 5. **条件渲染** 可以根据用户角色或其他条件来...

    android Menu

    SubMenu uploadMenu = (SubMenu) menu.addSubMenu(0,MENU_DOWNLOAD,1,"下载设置"); uploadMenu.setHeaderIcon(R.drawable.icon); uploadMenu.setHeaderTitle("下载参数设置"); uploadMenu.add(0,SUB_MENU_UPLOAD...

    Toolbar menu 菜单的学习与实现2

    对于更复杂的交互,如下拉列表、分隔线或子菜单,可以通过在菜单XML中添加`&lt;group&gt;`、`&lt;item&gt;`和`&lt;submenu&gt;`标签来实现。 在实际开发中,`Toolbar`菜单功能的灵活性使得它可以适应各种应用场景。例如,你可以根据...

Global site tag (gtag.js) - Google Analytics