Hey guys,

it's possible to add a 'customize menu' link like the framework theme provides?

Cheers, Yannick

CommentFileSizeAuthor
#2 contextual_customize-menu_932512.patch733 bytesteezee

Comments

philbar’s picture

Ya, that sounds reasonable. Editing menus isn't something I do regularly with my sites, so it's not a high priority with me. But I will except patches.

teezee’s picture

Status: Active » Needs work
StatusFileSize
new733 bytes

Here's a patch. Not super happy about it all though, for these reasons:

  1. Menu blocks would have two links, one (the default) would say "Configure" and the contextual menu link would say something like "Configure menu" or "Customize menu", the latter could start confusion as to what the first "Configure" means to do. That's why, in the patch, I change the original "Configure" links (only for menu blocks) to "Configure block" and add the "Customize menu".
  2. In Garland (and possibly many other themes), the normal navigation block in the left sidebar, doesn't fit more than one contextual link. For some reason (probably some float:left stuff) the links become full-block-width, and the second link won't be visible at all.

Although I would really like menu blocks to have a direct contextual link to the menu configuration, I think the UI would need some changes. Maybe something like Drupal 7 which only displays a cog-wheel that on hover opens a list of links.

yannickoo’s picture

Yeah, very cool, but I cannot see the customize menu link in the source code ;(

Yannick

teezee’s picture

@yan_nick Could you check if you have a menu block placed somewhere in your site? And not the user/0 block (which is called 'Navigation' but isn't a menu block).

1. Apply the patch from #2.
2. Make sure you are either logged in as user 1, or as a user that has the permission 'administer menu'.
3. Go to admin/build/menu and make sure you have some menu items (in for example the 'Primary links' menu)
3. Go to admin/build/block page, enable a menu block (for example the block titled 'Primary links', the configure link in the Blocks administration should be something like admin/build/block/configure/menu/primary-links)

Does it work then?

yannickoo’s picture

"And not the user/0 block (which is called 'Navigation' but isn't a menu block)."

Good to know ;)

There is just a wrench icon and "Configure block". This is linked to

/admin/build/block/configure/menu/primary-links?destination=node%2F9

Yannick

teezee’s picture

I tried to replicate but after applying the patch to the 6.x-1.0-dev version of contextual (1.0 should work too) and following the steps as mentioned in #4 i got the extra link.

But as i mentioned in #2 you don't SEE the link, because the left sidebar is usually too small to fit more than one contextual link. That will need some more UI work to fix but should be more a different issue. The tell-tale sign that the block is too small is that the first link (Configure) will have the same width as the block. The second link will be hidden because the links bar has a maximum height of 25px and an overflow:hidden.

When I place the primary links menu block in the content region (or any other region that is wide) the link should show.