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.
On path admin/structure/pages I have a page variant with layout AT Two column 33/66 (based on AT Responsive Panels - 2 column). When the viewport is smaller, the left 33% column goes above the 66% column. On path admin/appearance/settings in Panels & Gpanels I can see that the 33/66 has always stacking ordeer with 33 above 66.
Would it be possible that the 33% be displayed below the 66% on small devices? But without changing the wide screen columns order, on wide screen, the 33% must be on the left.
Comment | File | Size | Author |
---|---|---|---|
#2 | scr.JPG | 55.8 KB | raincloud |
#1 | two_33b_66.zip | 2.28 KB | fallenturtle |
Comments
Comment #1
fallenturtle CreditAttribution: fallenturtle commentedI created a custom layout to do just this for a site I was working on. I've attached the files in a zip file (two_33b_66.zip) that I uploaded to this ticket. Drop the files in /sites/all/themes/[themename]/layouts/panels/two_33b_66
Here's what goes in your theme info file:
settings[bigscreen_two_33b_66] = 'two-33b-66'
settings[tablet_landscape_two_33b_66] = 'two-33b-66'
settings[tablet_portrait_two_33b_66] = 'two-33b-66'
settings[smalltouch_landscape_two_33b_66] = 'two-33b-66-stack'
Uncomment the line that says "plugins[panels][layouts] = layouts/panels"
Comment #2
raincloud CreditAttribution: raincloud commentedAfter applying your suggestion, my theme info file now contains the following:
The directory
sites/all/themes/mytheme/layouts/panels/two_33b_66
contains the attached tpl.php and other files.I've re-saved Appearance settings (just in case) and cleared all caches, there are no erors in watchdog, but I can't see any changes in Appearance Panels. Maybe I'm looking in the wrong place?
For example, in the above screenshot, I would expect to see a third column for AT Two column 33/66 layout, related to the newly added settings:
settings[bigscreen_two_33b_66] = 'two-33b-66'
However, the 33/66 layout has only two choices (radio buttons). They have the following HTML respectively:
<input type="radio" id="edit-bigscreen-two-33-66-two-33-66" name="bigscreen_two_33_66" value="two-33-66" checked="checked" class="form-radio">
<input type="radio" id="edit-bigscreen-two-33-66-two-33-66-stack" name="bigscreen_two_33_66" value="two-33-66-stack" class="form-radio">
So, they are related to two_33_66 and not to two_33b_66.
It is similar for other media, e.g. Smalltouch Landscape AT Two column 33/66 also has only two options and they have HTML "value" attributes "two_33_66" and "two-33-66-stack".
It looks like AT doesn't see the new plugin, but I am not sure if I understand the plugin function correctly, I've always used only standard layouts.