In working on a new site, I needed a more flexible panel layout than any of the existing ones. So, I wrote an extension to the existing "two column stacked" layout that I'm currently calling "two column stacked double", since it's sort of a double-decker version of it. ;) See the attached icon for details. This all seems to work just fine for me when I put these 3 files in my panels/layouts directory.
A) Anyone else think this layout could be useful to them?
B) Earl, any chance of committing this upstream to the main panels distribution?
C) If not, where should I put this code? ;)
Thanks,
-Derek
Comments
Comment #1
dwwBased on feedback in IRC from merlin and yoroy, I'm renaming this "2 column bricks", since that's sort of what it looks like: masonry work. ;)
Comment #2
dwwWhoops, left the wrong description in the .inc file.
Comment #3
dwwI don't understand why the spacing seems funny on the "content" tab when using my new layout. See attached screenshot. Any panels experts can tell me what I'm doing wrong, if anything? Notice there's no space between the "Middle" region, and the "Left below" and "Right below" regions. Thanks.
Comment #4
yoroy commentedRight on :)
+1, I think it would make a usefull addition. Nice starting point for a sections overview or portal-y page.
Comment #5
dwwOk, I fixed up the uneven spacing issues. Here's the (hopefully RTBC) final versions of the .css and .inc. The .png is unchanged from #1.
Comment #6
yoroy commentedConfirming spacing fixes. Adding the files to panels module folder simply worked. May I set this to RTBC? We'll see. :-)
Comment #7
kinter commentedI am new to drupal and unsure how to install this patch on my site. I do not have access to shell but do have access to cpanel. I tried to install the files directly to the panels module folder as was suggested but had no success. Is there another folder I need to install the files to?
Comment #8
merlinofchaos commentedYou need to drop the inc, png and css files into the layouts directory; be sure to remove the _.txt extensions, as those are only put there to defeat the extension checker on the issue manager.
Comment #9
kinter commentedThanks for the help. I did as you suggested but now receive the following errors when I click on the two column bricks layout:
• warning: array_keys() [function.array-keys]: The first argument should be an array in /home/mysite/public_html/test/sites/all/modules/panels/panels.module on line 314.
• warning: array_shift() [function.array-shift]: The argument should be an array in /home/mysite/public_html/test/sites/all/modules/panels/panels.module on line 315.
• warning: Invalid argument supplied for foreach() in /home/myssite/public_html/test/sites/all/modules/panels/panels.module on line 413.
• warning: Invalid argument supplied for foreach() in /home/mysite/public_html/test/sites/all/modules/panels/panels.module on line 524.
Any idea on what is causing this?
Comment #10
merlinofchaos commentedFixed. BTW, note that if you just want to have your own layouts, hook_panels_layouts() should work to embed layouts in a module very nicely. The .inc files are a convenience for the code, but not actually required.
Comment #11
dwwYay, thanks, Earl. ;)
Comment #12
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.