I'm trying to hide attachment_1 on certain pages, but the code below doesn't work for me:

hook_views_pre_build(&$view) {
if ($view->name == 'calendar'){
unset($view->attachment_before);
}
}

This attachment is attached to page (before). Is there any other possibility to exclude attachment from display when concrete argument is provided to the page?

Thanks in advance.

Comments

Gall Anonim’s picture

Issue summary: View changes

} were missing

MustangGB’s picture

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