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've been doing lots of work recently to strip things away from the confirmation screen. It currently gets the attachments and header and footer added to the page even though those are unlikely to make sense on the confirmation screen.
I think it might be ok to just remove all of these from that page in general, but if some people find them useful then we might need a checkbox for them.
Comments
Comment #1
gregglesIn the case of the header/footer, they can be overridden with:
Comment #2
infojunkieFixed in latest dev release. Thanks.
Comment #4
WorldFallz CreditAttribution: WorldFallz commentedThis seems to have been lost in the 7.x version unless I'm missing it. I'm trying to suppress views attachments on step 2 of the modify fields form and the confirm form but I'm not having any luck. Any suggestions for where to handle this (form_alter, theme_, etc) would be welcome!
Thanks.
Comment #5
WorldFallz CreditAttribution: WorldFallz commentedI can't seem to find anywhere/anyway to hide this. I can't find any way to know I'm on one of the vbo confirm forms/steps to hide it with CSS, or theme it out in a template file for the view. And i can't find anything in form_alter or hook_views_bulk_operations_form_alter either.
Comment #6
scott.whittaker CreditAttribution: scott.whittaker as a volunteer commentedOK, it's not as good as actually removing the content before it's rendered, but here's how I'm doing it:
First off I used the context module to create a context called vbo. Then in my module's hook_views_bulk_operations_form_alter I check if the form_id matches the VBO pages I've got, and if so, add the following code:
Originally I attempted to use the vbo context to not show the views blocks on this page, but it seems that setting the context here is too late in the process for the context module to pick up. But it does add a context-vbo class to the body of the page. So I'm hiding it with a CSS rule:
.context-vbo .attachment-before { display: none; }
So unfortunately all the content is still generated and output to the page but at least it is hidden by CSS. Would love to have a proper solution for this though.
Comment #7
thommyboy CreditAttribution: thommyboy commentedthis seems to be lost in 7x and would be really useful. an attachment might not always make sense on the confirmation step!
Comment #8
Chipie CreditAttribution: Chipie commented@scott.whittaker Thank you for your idea. Works great.