Download & Extend

Allow for custom name of "extra page link"

Project:DHTML Menu
Version:7.x-1.x-dev
Component:User Interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Some users find the "extra page link" confusing. They also wouldn't think to double-click the parent menu-item to open it up.

I think it would be made more clear if custom text or custom patterns could be used for that link.

In my case, I would add an "all " in front of the link, but I can see how it would be useful to make that link anything a user wanted.

Example of how it would appear:

Shapes

  • all shapes
  • Squares
  • Circles
  • Triangles

Comments

#1

Version:6.x-3.2» 7.x-1.x-dev

This is an excellent idea, and I shall try to incorporate it to HEAD and backport it to D6.

Customization settings would probably be injected into the admin/build/menu/item/%/edit page, allowing users to set and reset a custom label, as well as disable the clone for this item.

If the feature works, perhaps a collection of these custom settings could also be added to another tab of DHTML Menu.

#2

I wonder if there might be a status update on this?

#3

Is it working ?
How can I change it in the code ?
I'd like to set 'Show all (2132)' link and place it in the bottom of each list, instead of the top, like now.
I am asking about D6 code.
Thank you.

#4

This is just a quick hack, but I might look into making a patch that does this decently:

In dhtml_menu.js Drupal.behaviors.dhtmlMenu (line 13) you can find the following code:

  /* Add jQuery effects and listeners to all menu items.
   * The ~ (sibling) selector is unidirectional and selects
   * only the latter element, so we must use siblings() to get
   * back to the link element.
   */
   $('ul.menu li.dhtml-menu:not(.leaf,.no-dhtml)').each(function() {
    var li = this;
    if (effects.clone) {
      var ul = $(li).find('ul:first');
      if (ul.length) {
        $(li).find('a:first').clone().prependTo(ul).wrap('<li class="leaf fake-leaf"></li>');
      }
    }

I simply changed the text of that link:

      if (ul.length) {
        var overview = $(li).find('a:first').clone();
        overview.text('view all');
        overview.prependTo(ul).wrap('<li class="leaf fake-leaf"></li>');
        /*$(li).find('a:first').clone().prependTo(ul).wrap('<li class="leaf fake-leaf"></li>');*/
      }

I think we should introduce a setting for a custom text. If it is activated, then something like effects.clone_custom_text should be used when setting the text.

-- Sara

#5

subscribe

#6

i wanted to post exactly this a minute ago, but fortuanately i saw your request. agreed.

#7

Sara Adams: Great hack, this is what I am trying to do for about an hour :)...

And how to show this 'Show all' link in the END of the list, not in the beginning ?

Anybody knows ?

nobody click here