Contextual links backport - more or less

Drupal 7 now comes with the contextual module which makes it very easy to edit your site as there are inline action links available on your content, blocks and so on. There are a few modules out there available for D6 - block edit and admin:hover come to mind - which offer the same functionality but are different when it comes to interface and/or extendability.

We decided to write a new module from scratch with the UI in mind of the D7 version, also taking care of performance and the need for easy extendability including hooks (duh) and static actions which allows us to have a static variable during the page request which can collect stuff from all over the place. You can test it out at with demo/demo. Surf to the 'articles' page which has contextual links for views, nodes & blocks.

What happens next ?

  • I could contrib this back and ignore all other efforts out there.
  • Merge this with block edit (or another) but with another branch (and also another name).
  • Commit this as a complete new project but with a good comparison to other modules.
  • Simply do nothing, saves me another project I need to maintain .. :)

So, let me know what you think, add comments, mail or ping me on IRC if you want to have a talk about this.

Update 17/03: code is available at


stijn on Wed, 10/03/2010 - 18:14

I'd definitely be interested in this module.

You could always put it up at Github without officially supporting it on d.o. User can download it if they like and others could fork the project to do whatever it is they want to do. This way the source and the effort is out there without you having to maintain a project.

Since this will be part of Drupal 7 anyway I don't see the need for a new project and you could easily get away with it being a proof of concept bridging the gap between Drupal 6 and 7.

Damien McKenna on Wed, 10/03/2010 - 19:57

Have you attempted to reuse structures & naming conventions from the D7 functionality or is the UI all you've used? For real value, given there are so many similar modules already, you should try to keep it as close to a backport of D7's functionality as possible, which would make it easier for people to migrate their functionality to D7 when the time came.

joshmiller on Wed, 10/03/2010 - 21:34

Excellent interface -- exactly what I need. If you do not post it as a Drupal module, then I will gladly support it on d.o for the remainder of D6 lifetime.


Kevin Morel on Wed, 10/03/2010 - 21:37

I think you should maintain it :-)

Matt Petrowsky on Thu, 11/03/2010 - 00:57

Yeah, at least github it (and let me know). If you do put it up on d.o. and you want some exposure for it (always good motivation), I'll do a video article on it and we'll see how many installs it gets up to within a short period of time!

Anonymous assjack on Thu, 11/03/2010 - 14:47

put on d.o looks terrific(in a good meaning)

sun on Thu, 11/03/2010 - 20:18

Note that

1) already contains "back-portish" code

2) there are still a couple of open bug reports for Contextual module - please help in fixing those before trying to work on a backport.


Stephen Musgrave on Fri, 12/03/2010 - 13:22

This module has something that the others don't -- good design. I'm immediately impressed by subtle, meaningful visualization.

Stephen Musgrave on Sat, 01/05/2010 - 00:12

Can you add some more instructions in the README file?

I see that I need to add another variable to my template files -- but what is that variable supposed to do?

So far I've added:

print $node_classes

to my node.tpl.php file. That did nothing.

I did a dms($node) and I don't see anything in there, either.

eigentor on Mon, 06/09/2010 - 08:47

+1 for making a project out of this.
Not doing so is less work - understandable. Making a project is better for people who use it...

LPCA on Thu, 09/09/2010 - 23:50

have no idea how to add the variables.

is it through the preprocess functions?
how? where?

please commit the code to a drupal project at with full instructions. i'm sure someone will want to maintain it

Add reply

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
Have you written a response to this? Let me know the URL by sending a webmention.