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.
Scenario:
- Enable Panelizer for an entity bundle, e.g. a content type; note that on the form it initially lists all view modes, so for the content type it'll list RSS, search index, search result, etc.
- Save the settings.
- Load the entity settings form again, note that the list of view modes only contains a small subset of the items previously available.
Comment | File | Size | Author |
---|---|---|---|
#12 | panelizer-n2147795-12.patch | 17.35 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaIt turns out that the logic was built this way on purpose, which IMHO doesn't make sense as it was stopping the view mode selection from being modified after it was initially selected.
Comment #2
DamienMcKennaThere's a similar problem with the main settings page (admin/config/content/panelizer) that shows up when using #1820442: Panelizer for Comments.
Comment #3
DamienMcKennaI'd like to discuss this with merlinofchaos as the existing code that's creating this bug seems like it was put there on purpose.
Comment #4
DamienMcKennaComment #5
DamienMcKennaAfter digging into it more I realized that this is actually on purpose - only the view modes that have their displays overridden can be controlled through Panelizer.
What we need, however, is some UI indication that this is the case, with links as appropriate.
Comment #6
DamienMcKennaThis adds a description on the Panelizer vertical tab on add_bundle_setting_form, implements hook_help to add a help message on the main settings page, and adds links to the Manage Display page of the entities that support it.
Comment #7
DamienMcKennaA related patch: #2193565: Panelizer options on new content type different to existing content types
Comment #8
jamestombs CreditAttribution: jamestombs commentedDidn't even realise that was possible.
In fact after reading the documentation from your patch, my patch breaks the module (i.e. you can't panelize search result even if you have checked the box on Manage display).
Attached is a patch including UI/documentation changes as well as a fix to my patch.
My changes hide all the options which have no effect until they are enabled under Manage display after which they'll appear.
Comment #9
DamienMcKennaComment #10
DamienMcKennaA bit of an improvement, I think. This streamlines the UI, adds a separator in between each view mode's settings to make it more clear what settings are for which view mode.
Comment #11
DamienMcKennaFixes for the logic that decides whether or not to show a view mode.
Comment #12
DamienMcKennaFurther improvements to the view mode selection logic. I think this is correct.
Comment #13
DamienMcKennaCommitted.