More block locations?

More block locations?

by Keith Bennett -
Number of replies: 2

How difficult would it be to have more block locations?  Right now it seems that we have 3-left, right and center.

I'd like to be able to put a block anywhere in the theme template I want.  Forexample, I might want the login or search block in my header before the Site name and logo. Or I might want more blocks in the "center" part either above or below my site description and courses / forums.

Is it possible to do this?

How difficult would it be?

Average of ratings: -
In reply to Keith Bennett

Re: More block locations?

by John Papaioannou -
The good news is that library support for this kind of feature already exists, so you would only have to utilize it instead of writing it from scratch.

The bad news is that right now this support is kind of dormant, and not yet documented apart from comments in the code.

As a starting point, I would recommend getting to grips with the contents of /lib/pagelib.php and looking at /blocks/pagedemo.php for an example. Warning: the pagedemo.php file may not work out of the box, it hasn't be updated for some time.

I have a mostly written but unfinished how-to and reference for pagelib document lying around here somewhere. But there won't be time to finish it before September most probably. mixed
In reply to John Papaioannou

Re: More block locations?

by Keith Bennett -

Thanks. I wasn't sure if this was a theme topic or a block topic.

 I'll try to dig around in there and see what I can break black eye

September would be wonderful approve  I don't think I can go live before then anyway.

Thanks again.