- Issue created by @kriboogh
- First commit to issue fork.
Instead of adding a new type of display block, we could change the class of existing block displays with the new class. This way when you have an existing views block and add a contextual filter, you can allow this filter to be overridden. Now you would need to create a new block, configure it the same and add the contextual settings.
Remove the annotation from ViewsBlockOverride and use alter hook to change out the block display class.
function views_block_override_views_plugins_display_alter(array &$plugins) {
$plugins['block']['class'] = 'Drupal\\views_block_override\\Plugin\\views\display\ViewsBlockOverride';
}
- write the hook
- remove the annotation from the ViewsBlockOverride class (maybe relocate it ??)
- create an updb hook to change existing block override displays and reset the "views_block_override" id to "block".
none
none
"views_block_override" plugin id will become "block"
Active
1.2
Code