PostNuke

Flexible Content Management System

News

Idea: Layout evolution

Contributed by Anonymous on Nov 21, 2001 - 12:15 PM

This includes the page itself, the header, the footer - everything.





Each 'block' can have one or more parents, when a parent is displayed it retrieves all it's children so on ad infinitem...





How to implement this? Well although I'm not an expert in OOP (my real job ties me to procedural code), this screams 'classes'.


PN implements a 'block' class, providing all the common methods/functions (admin, register, show GetCssStyle etc) which each new type of block extends, overriding the methods where appropriate and adding new ones if required.





Each block would define a virtual 'grid' (implemented as an html table) with fixed or variable cell sizes, each cell having a unique ID which the child block would use to position itself.


Each block would also be attached to a css style.





I realise this is sort of the approach taken already, but much of the block configuration is code based, with only the positioning (limited to left/right & order) defined by the admin screens.


By evolving (I don't see this as revolutionary!) towards treating every object (dang, it's that word again) as a block you gain a massive anount of flexibility, which I'm sure others more talented than myself will be able to visualize and describe...

1441