简体   繁体   中英

Joomla menu item

I want to create a subtitle option for menu items in Joomla (an alternate layout), so a menu item displays with its title and subtitle. I imagine this can be done in many ways, including:

1) Altering menu item layout in Joomla and adding a subtitle input field, telling Joomla to display this subtitle field in the menus that I wish to display it in.

2) Entering the subtitle directly in the current menu item title field and getting Joomla to render this as a separate title (subtitle).

I am sure there are more ways and pros or cons for all. I reckon going for option 2 would be the easiest. In option 2 the input in the menu item manager can be:

Menu Item title: blablabla || yadayadayada

Joomla needs to reckognize the pipes as seperator between menu item title and menu item subtitle and render them seperately so I can style them.

I am really noob in php. Could anyone point me in the right direction on how to construct this override?

Any help is highly appreciated.

/nitro29

If you're a 'real noob' in php I would suggest using one of many menu extensions on the Joomla Extension Directory that already do this.

One of the most popular that comes to mind is RokNavMenu from RocketTheme — it's both free and open source and used extensively by them in all of their templates.

If none of them do exactly what you want, then you can pick the one closest to your needs and modify it, which will definitely be quicker that re-inventing the wheel and learning all the ins and outs of the Joomla CMS and frameworks.

If you do want to develop your own I would suggest keeping the Joomla Doc's site open to the Developer portal page . It can be very handy, even if you have to search a bit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM