I have a site that has a large number of possible header images which I'd like non-technical users to be able to administer, so this module is great in that regard. The only missing feature from our point of view is random selection. What we'd like is for the header images to be randomly selected when no other conditions evaluate to true.
I've tried to keep the changes as light as possible and to not alter the existing functionality at all. Basically, I've added on a per-block option to "fallback" to a random node selection when no node is selected by the normal conditions. If any condition evaluates to true, or if the new option is not selected for the block, then the module behaves as before.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | random.patch | 2.58 KB | sutharsan |
| headerimage.module.random-fallback-0.patch | 2.49 KB | ashtonium |
Comments
Comment #1
sutharsan commentedThank you for your code! Good idea, it already comes handy with a project I'm working on now.
A few minor changes I have made. The attached patch is committed to HEAD, 5-dev and 6-dev.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.