I've modified Views Modes to have the Views Modes Links created as an Area instead of a Block. As an Area the Links can be configured above, or below the view content. This resolves an issue I was having as the current code for generating the links was unable to determine the view when used in a Panel.

I took the approach of disabling the existing block methods. This may not be optimal for all parties, however it isn't particularly difficult to modify existing views to add the (newly) required Header.

The patch will be forthcoming.

Comments

topham’s picture

Status: Active » Needs review
StatusFileSize
new4.05 KB

Patch to put Links (Views Modes Links) into Area

batje’s picture

I think disabling the block would break existing websites. Its surely a good idea as an additional option.

(a very small space sneaked in by accident, too)

+      if ($display->display_plugin == 'mode' && !empty($display->handler) && $display->handler->is_attached_to($view->current_display) && $display->handler->access()<HERE>) {

If you could adapt your patch that way, that would be very nice

topham’s picture

The patch, as it stands, would break existing sites, no question. I'll see what it would take to modify it to check if an Area (Header or Footer) is enabled for the view and disable the block then. The issue I have with that is the hooks will still be called. I would prefer to reduce the hooks being called if they aren't going to be doing anything anyway.

batje’s picture

You dont have to disable the block when people configure a header. Its up to the site builder to place a block or not (eg. using context)

If both the header and the block are optional, that would be the real configurable Drupal way.

topham’s picture

StatusFileSize
new2.71 KB

Here's an updated version. The Block mode, as well as the Header / Footer areas work. The extra space is gone.

topham’s picture

Priority: Normal » Major
batje’s picture

Status: Needs review » Closed (fixed)

Sorry for the delay. Commited.

playfulwolf’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

It is not committed or there is alternative release to current dev?

mediaformat’s picture

It would be great to see the links rendered as a views exposed widget, really this module acts like a filter for views.