fbpx Views 2: Making a drupal views block title link back to the view | ComputerMinds Skip to main content

Views 2: Making a drupal views block title link back to the view

13th Feb 2009

Steven Jones

Senior Developer

We wrote an article about linking a view's block title to the companion page view, in Drupal 5. Someone asked for a Drupal 6 version, which can be quite easily done with a preprocess function, but it's not very flexible.

Instead we just need to create a new display plugin for Views 2, and that will allow us to be much more flexible in our approach.

This is my first display plugin, so it may be completely broken (though it works for me!) You'll just need to download and install the attached file like any other module.

Instead of adding a 'Block' display to your view, add the 'Block (title link)' display, and you'll get an extra option to define which display you'd like the block's title to link to. Simple.

[EDIT] It was completely broken! But it is now fixed and should be working nicely.

[EDIT] We lost the attachment in a server migration, but there is work to get this into views here: http://drupal.org/node/614944