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.
When editing a block's mobile visibility settings allow the block to be moved to a different region.
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | mobile-region-1818926-3.patch | 9.61 KB | msmithcti |
#1 | mobile-regions.jpg | 39.74 KB | msmithcti |
#1 | mobile-region-1818926-2.patch | 7.99 KB | msmithcti |
Comments
Comment #1
msmithcti CreditAttribution: msmithcti commentedThis patch adds additional form items to choose an alternative region to show a block in when on a mobile device.
The patch adds two columns to the browscap_block field to store the region information (update.php must be run).
Comment #2
msmithcti CreditAttribution: msmithcti commentedApologies, that patch doesn't apply properly. Here's an updated patch:
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedOK, I like the idea, its probably similar to what I built into Adaptivetheme before I built this module, aka this feature should have always been in the module, not in the theme, so yeah, lets do this.
Comment #4
rpeters CreditAttribution: rpeters commentedI tries this patch and it did not work do you have one that works?
Comment #5
msmithcti CreditAttribution: msmithcti commentedJeff, glad you like the idea. I think I'll probably focus any efforts on #1730962: Doesn't work with caching enabled as this isn't much use without being able to use some sort of caching.
@rpeters - Thanks for taking a look at this. For some reason the DB update function isn't being called on install. For now you can call it manually if you have devel installed at devel/php and it should work OK.
Comment #6
caseyb CreditAttribution: caseyb commentedI'm really keen to implement this on my site - what is the code to call the DB update function as indicated in #5 above?
Comment #7
zJoriz CreditAttribution: zJoriz commented+1. This would be a useful feature.
One detail: the weight of blocks should still be configurable. Having the 'duplicate' block also be visible and configurable in the blocks overview page would be awesome. Then again, I suppose that would be hard to code.
Panels offers similar features, but personally I don't like the amount of configuration needed and the amount of html it adds.