Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #0.0
Gall Anonim CreditAttribution: Gall Anonim commented} were missing
Comment #1
MustangGB CreditAttribution: MustangGB commented