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.
Is there a way to remove some or all of the default layouts that DS has?
Comment | File | Size | Author |
---|---|---|---|
#12 | 1132682-11.patch | 5.61 KB | aspilicious |
Comments
Comment #1
swentel CreditAttribution: swentel commentedWell, the easiest way is an alter hook before all layouts are returned (easy, takes 5 minutes) or even an interface to select layouts you only want to make available (easy too, but takes some time). So hook and/or UI, all good for me, will try to come up with a patch somewhere this week.
Comment #2
edward_or CreditAttribution: edward_or commentedA hook sounds awesome to me! Thank you very much.
Comment #3
swentel CreditAttribution: swentel commentedAlright, dev now has an alter hook, e.g.
Comment #4
edward_or CreditAttribution: edward_or commentedWorks as described. Thanks again.
Comment #6
LewisNymanHi, is this available in 8.x? It's implemented by ds_extras but not documented in ds.api.php.
Comment #7
swentel CreditAttribution: swentel commentedWell, layouts are discovered through layout_plugin module, which should have an alter, so you can remove them there normally.
Comment #8
aspilicious CreditAttribution: aspilicious commentedWe use the layout plugin module now.
Looking at this code, the hook should be "hook_layout_alter(&$plugin_definitions)"
http://cgit.drupalcode.org/layout_plugin/tree/src/Plugin/Layout/LayoutPl...
The drush command is also broken, my colleague is working on that next week.
Comment #9
swentel CreditAttribution: swentel commentedrelated: #2571341: hook_ds_layout_info does not exist anymore
Comment #10
Novitsh CreditAttribution: Novitsh at Colruyt Group Services commentedUpdating metadata, relating issue from #9.
Comment #11
aspilicious CreditAttribution: aspilicious commentedLet's see what bot thinks...
Comment #12
aspilicious CreditAttribution: aspilicious commentedComment #13
aspilicious CreditAttribution: aspilicious commented