Hi,

For my own need, I needed a container/wrapper for certain menu elements.

What it does is, offers you to use < container > in the url path.
Then simply adds an extra ul element in the menu but without any li attached to it. This acts as a wrapper.
Also, note that in your breadcrumb, the container will be removed.

I have attached a patch with my code.

Please review and if possible include in the dev version.

thanks

Comments

webadpro’s picture

Issue summary: View changes

Updated Description

webadpro’s picture

StatusFileSize
new4.8 KB

Updated Patch.

webadpro’s picture

Would it be possible to someone review this and push it to the Git?

webadpro’s picture

Any updates?

gagarine’s picture

Hoo this is sweet! I was thinking to implement that so we can finally fusion this module and http://drupal.org/project/menu_item_container

the patch need to be review before commit. Also it's certainly need to be redone for the last -dev.

webadpro’s picture

Although keep in mind that this container isn't the same as the menu_item_container module. No text would be actually output for the container menu item but simple an extra HTML tag such as UL.

gagarine’s picture

Category: task » feature
Status: Needs review » Postponed

I see.

Before working on that, I want all major fixed. Some issues are going to change how this module works like #1447988: Override theme_link instead of the theme_menu_link.

After 7.2 is out, I will see how I can provide a hook so people can easily extend this module.

Also if it act as a wrapper... why not name it "wrapper" :)

webadpro’s picture

Is there a hook available to provide custom code? Its been almost a year.

marcvangend’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Postponed » Active
StatusFileSize
new3.29 KB

Here's a reroll/rewrite of the patch in #1, created against version 7.x-2.0 (which is at the moment identical to the 7.x-2.x head).

The only true change I have added, is that the container link is rendered as a non-linking title in the admin back-end (for usability purposes), but invisible in the front end (as you would expect from a container).

marcvangend’s picture

Status: Active » Needs review
marcvangend’s picture

Issue summary: View changes

was not showing the tag

marcvangend’s picture

Title: Add <container> in url » Add "container" type for grouping menu items
Issue summary: View changes

Changed title because it did not display correctly in the d.o issue overview.

delmarr’s picture

patch failed for me

version = "7.x-2.0"
core = "7.x"
project = "special_menu_items"

→ patch < special_menu_items-container-1372186-8.patch
patching file special_menu_items.module
Hunk #1 succeeded at 34 (offset 6 lines).
Hunk #2 FAILED at 54.
Hunk #3 succeeded at 82 with fuzz 2 (offset 17 lines).
Hunk #4 FAILED at 158.
Hunk #5 succeeded at 186 with fuzz 2 (offset 23 lines).
2 out of 5 hunks FAILED -- saving rejects to file special_menu_items.module.rej
badrange’s picture

Patch worked for me, against a git checkout.