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

Larry Garfield larry at garfieldtech.com
Sat Feb 23 20:17:22 UTC 2008

That's also the original logic behind the component module:


That said, -1 to putting function calls directly in the template.  They're not 
portable to other template engines other than PHPTemplate.  That's also 
putting too much logic into a template, where it belongs in a theme/template 
(preprocess) function.  

On Saturday 23 February 2008, David Metzler wrote:
> Yep, I used something similar to this used to be possible in 4.7 and
> I used it to create a region and put it in into a panel using Panels
> so that I could still use block subscription and fole filtering logic
> etc within a panel.
> For some reason it quit working in 4.7 most likely because I was
> causing some system internal that shouldn't have been done.
> Love to see this supported.
> On Feb 22, 2008, at 5:20 AM, Gábor Hojtsy wrote:
> > On Thu, Feb 21, 2008 at 8:20 PM, Earl Miles <merlin at logrus.com> 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.
> >
> > Completely understood. I always disliked that PHPTemplate builds all
> > block regions regardless of needs. I used to use lots of conditionals
> > around block region bulilding in my pure PHP themes (before migrating
> > over to PHPTemplate not long ago, due to its other advantages). So
> > after all, a possible explosion of blocks / regions would require some
> > (more) benchmarking and thinking about block performance. (Given that
> > I am working primarily on better support for WYSIWYG right now, this
> > is not my top priority unfortunately).
> >
> > Gabor

Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 

More information about the development mailing list