[development] Fixing themes and regions

Neil Drumm drumm at delocalizedham.com
Fri Aug 18 00:30:21 UTC 2006


Nedjo Rogers wrote:
> I know that there's work ongoing to improve theme handling of regions. 
> But I'm behind on the status of this work. Is any of it for 4.8/5.0?

I see two big challenges in block administration:


1. The number of regions is getting larger

Block regions are defined by the needs of page templates. Multiple 
themes can be enabled and have at least one page template each. More 
page templates can be defined by path [1]. There continue to be a lot of 
blocks.

This trend is already straining the existing user interface. Placing a 
block in multiple regions will probably be wanted in the future.

The UI is currently block-driven, you see every block and decide where 
it needs to go. I think this needs to be reversed to be region-driven. 
You see every region and decide what needs to go in it.

The first step might be getting rid of the disabled block listing and 
instead putting an add block function in every region along with 
database and architecture changes to allow a block to appear twice. The 
rest would be finding good ways to arrange the regions in a way that works.


2. It is (still) hard to tell when a block will show

Whether a block will show or not is a combination of
- The theme is being used
- The page template being used
- The overall block configuration (including throttle)
- Logic in the module generating the block
- Various settings on the block's configuration page
- Users' settings

The various types of rules I could identify from module logic and user 
settings include
- Permissions (module) and roles (setting)
- Does any content exist (module)
- Node type (module and/or setting)
- Page path (module and/or setting)
- Users' setting (setting)
- PHP code (setting)

One improvement could be improving the visibility of the module logic by 
listing the rules next to the user-created rules. Since many of the rule 
types can be user-generated and/or module-generated, integrating these 
in API (instead of simply putting another thing on the block API to put 
out a string describing when the module intends to show a block) would 
be a good gain.



[1] While defining page templates by path is great for custom themeing, 
it limits the ability to redistribute themes since paths will change 
from site to site. It would be nice to have a UI to pick which page 
template is on which page.

-- 
Neil Drumm
http://delocalizedham.com/


More information about the development mailing list