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 created a custom flexible layout with panels but it didn't show up. On line 817 of ds.module $layout['panels']['name'] is called but is not defined for custom flexible layouts in hook_ds_layout_info, I added a patch that fixes the problem. Don't forget to clear cache.
Comment | File | Size | Author |
---|---|---|---|
#1 | flexible-panels-1.4.patch | 1.27 KB | OnkelTem |
customflexiblepanel.patch | 491 bytes | Casper_Deseyne |
Comments
Comment #1
OnkelTem CreditAttribution: OnkelTem commentedHahaha...
Same here. I've just created the patch with same fix )))
7 minutes difference :)
Comment #2
swentel CreditAttribution: swentel commentedAh crap, stupid I forgot that one. Committed and pushed, thanks guys! Went for the first one, no real need to reassign $layout to $panels variable.
Comment #3
OnkelTem CreditAttribution: OnkelTem commentedOf course. I just was trying to keep the comment - // We need the Panels plugin info array to ... :-)
Comment #4
binkerman CreditAttribution: binkerman commentedHi Guys,
Sorry to bother you with this question but what do I do with that code in the patch? do I past this somewhere in an existing php file? or do I create a new one?
thanks
ruben
Comment #5
OnkelTem CreditAttribution: OnkelTem commentedThere is a program called 'patch' which is used to apply patches. If you have it in the PATH, then place .patch file in the root of the module Display Suite and type:
patch -p1 < the_patch_file.patch
and the patch will be applied.This patch is very simple so you can apply modifications manually. All the information are in the patch file and almost self-explainning:
diff --git a/sites/all/modules/ds/ds.registry.inc b/sites/all/modules/ds/ds.registry.inc
it is about `ds.registry.inc` file, which is in root of the module
@@ -349,6 +349,7 @@ function _ds_ds_layout_info() {
locate line number 349, and in the function
_ds_ds_layout_info()
add the line makred with "+" in the same place.
Good luck
Comment #6
binkerman CreditAttribution: binkerman commentedThank you very much for the elaborate answer! I will install netbeans and apply the patch.
Have a nice day!
Ruben