CLE

Categories

Component ID

1445254

Component name

CLE

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

CLE - Contextual Links Everywhere

link module demonstration symbolThe CLE module is a lightweight harmless UI tweaking module to extend the use of contextual links instead of tabs and can NOT break a site or its database. But beware this is under development and may not be completely functional yet.

Details

By default, view mode full node pages or user pages have no contextual links enabled in Drupal core. While for some of you it may feel inconsequent, this is reasonable based on the history of why contextual links were introduced and why they are not everywhere: The main reason to introduce them was to have local tasks available for each node on node list views without tab cluttering on teaser pages, while teaser lists are no forthcoming views for editing in questions of accessibility. And on view mode full pages there are tabs to manage primary and secondary local tasks on nodes to grant accessibility in a general manner.

Depending on use-cases and project types with certain priorities it still may feel cluttering and the tabs should be moved to the contextual links known from the teaser lists. This is where CLE comes in as an option.

Warning: Usability initiative vs. accessibility initiative. Like so often. The functionality of CLE is an accessibility issue for many reasons. That's why this is moved to a contributed optional module. It makes sense to use it for portals with a known group of users, where accessibility issues are utterly out of the question and keeping the interface clean has priority. Moving all local tasks from tabs to contextual links may break accessibility rules for non-mouse users and browsers with JS disabled or text based browsers. (We work on this by keeping tabs active but hidden via CSS).

What CLE is doing

The CLE module renders local tasks from the primary and secondary local tabs to contextual links and enables you to have contextual links not only on node lists and blocks, but also on view mode full node pages, node forms, user pages and everywhere else, expandable to all areas we can think of, depending on how much help I get here for it. Additionally, the primary and secondary tabs can be disabled for this regions in two ways:

  • hidden via CSS to keep accessibility for text-based or keyboard-tab-based browsing
  • programmatically deactivated completely.

Recommendation

Use CLE together with the CCL module to have full control over contextual links and available tasks in them. That's why I choose the near name. Feel free to discuss a merge in the issue queue. CCL enables you to add custom contextual links to the contextual links menu.

@TODO Future plan is to have another option to decide which user roles and which paths/*/area this option should be active, what makes sense for projects, where accessibility issues have priority in one area and a clean interface has priority in another area. Feel free to post a feature request issue to ask for another area where you think the contextual links option should be added.

Feel free to post an issue to ask for the future of this project. (Core/Contrib/Merge)

#Issues which have inspired the need of CLE:

  1. http://drupal.org/node/1019486 Views module: Display fields in a contextual links block
  2. http://drupal.org/node/951088 Contextual links instead of tabs
  3. Contextual links backport
  4. working with contextual links
  5. contextual-links-example-object.tpl.php
  6. Drupal 7 tip: Add contextual links to anything
  7. core issues for contextual links
  8. No contextual links on full node view is confusing - A favourite issue of mine and a discussion I follow and where I agress with, that it is confusing indeed
  9. And here an interesting core issue about the history of contextual links: "D7UX: Put edit links on everything"
  10. https://github.com/swentel/contextual/blob/master/contextual.module swentels D6 adaption of the contextual links idea