[development] Making blocks from some setting in Drupal 7?

Aaron Winborn winborn at advomatic.com
Thu Feb 21 21:17:40 UTC 2008


Ah, yes, if a page doesn't pull a region, it still generates blocks for 
it, unless those blocks think they aren't needed for the page.

I'd like to see us make that a little smarter. Maybe each page request 
could have a list of regions it needs built? Not sure how that could 
work off the top of my head.

The easiest way would be to have an admin/settings/regions page, similar 
to admin/settings/blocks, that allowed you to set a 'Region page 
specific visibility'. Another might be to have the menu store the 
regions a page needs. Probably half a dozen other approaches that could 
be explored as well.

Aaron Winborn wrote:
> I thought blocks were only generated if they needed to be based on its 
> "Page specific visibility settings"? In that case, they would just 
> need to be defaulted with specific <front> or whatever settings to 
> emulate current behavior.
>
> Earl Miles wrote:
>> Gábor Hojtsy wrote:
>>> What do you think?
>>
>> My one concern here is that because the block system is push, not 
>> pull, all blocks in all regions are always generated, regardless of 
>> whether the page needs them. That means we run the risk of degrading 
>> performance by generating a whole bunch of material that we have no 
>> intention of displaying, unless we have some way for the theme to 
>> signal which regions it wishes to generate on any given template. And 
>> that's a tough thing to do in the current system.
>>
>> This is one of the reasons I like the panels approach, but that's 
>> still pretty far from being able to fully emulate the block system.
>>
>



More information about the development mailing list