Project:Views attachment block
Version:6.x-1.2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Hi,

I created a patch to port the module to drupal 7. You can test it and if you want give some feedback about it.

AttachmentSize
views_attachment_block_6.x-1.2_d7.patch4.73 KB

Comments

#1

I just tested the module with your patch but the view (block) is not show at all. So far I noticed that in function execute() (views_attachment_block_plugin_display_block_attachment.inc file) $view variable is empty. Any ideas ??

edit: ok I figured it out - I modified execute function in way bellow:
function execute() {
if (!empty($this->view->is_attachment)) {
// The view is being executed on another view.
return $this->view->render($this->display->id);
}
else {
$view = views_get_page_view();
if (is_object($view)) {
$content = $view->view->build_info['blocks_attached'][$this->display->id];
// This is a hook_block impleattamentation calling:
// Prior to this being called, the $view should already be set to this
// display, and arguments should be set on the view.
$info['content'] = $content;
$info['subject'] = filter_xss_admin($this->view->get_title());
if (!empty($content) || $this->get_option('empty')) {
return $info;
}
}
}
}

#2

I just applied this patch and am able to use the module with no problems in Drupal 7.7 using the latest dev releases of Views & Ctools. I had to clear all caches in order for the "block attachment" option to appear in views under "Add." Very useful, thanks.

#3

Status:active» needs review

I have rerolled the patch following the standard Drupal git guidelines. Note that this needs to be applied on the tar.gz downloaded from the module page - not the latest dev.

AttachmentSize
views_attachment_block.1170454.patch 4.13 KB

#4

The patch is great however 'Use AJAX:Yes' isn't working.
I am on D7.9
Is it the same with everyone else?

If AJAX isn't needed one can simply create a block with the same parameters as attachment.

#5

Very need a working module for Drupal 7 :(

#6

Me too. Anybody working on this? [N.B. I have not yet had a chance to try the patch.]

#7

Have now tried this. Appears to work from the view pages, but the block never renders on the site.

#8

and I see the following error

Notice: Use of undefined constant BLOCK_NO_CACHE - assumed 'BLOCK_NO_CACHE' in views_attachment_block_plugin_display_block_attachment->execute_hook_block_list() (line 110 of /data/www/sites/all/modules/views_attachment_block/views_attachment_block_plugin_display_block_attachment.inc).

#9

OK, this *does* work, but the attached view has to be attached to a page view explicitly, not to the "master" view.

nobody click here