#62 Block tables


Wanted: the ability to arrange blocks in tables (or
rows, which are just n x 1 tables).


It would be easy to adapt or extend the block_i class
to arrange the blocks it gets in a table. I did it
once and maybe I can find that code again. But
something I just thought of is that the class is going
to need to know how many rows or columns the table will
have. Where does that information go? It shouldn't be
hard-coded into the script that generates the page,
although that would be easiest. It could be put in the
template somehow and extracted with Template::set_block
functions, but that's not the intended use of that
function. I'm wondering if this kind of extension
calls for a Block_i database table and corresponding
administration page. There we could give rows and
columns, an additional template to wrap around the
arranged blocks, the key (the block variable currently
called "column") to lookup blocks and the template
variable (e.g., "CENTER_BLOCK_TABLE") to bind it to.
This would make generating blocks for pages as easy as

$block = new Block_i;


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks