Search the Community
Showing results for tags 'slots'.
Found 1 result
"blocks" or "slots", with inheritance
mindplay.dk posted a topic in Getting StartedJust starting to look into PW, and really liking the concept so far. I think this question may have been asked, possibly here or here - but maybe not quite the same issue. I'm looking for a way to do a "portal"-style block-system, but with inheritance. Drupal doesn't really do this (or doesn't do it well) and I'm not sure it's quite what was asked for in those other two threads, so let me try to explain. Basically, I want to allow the content administrator to place arbitrary blocks in, say, a left and right sidebar. These blocks could be anything from just a title and some static HTML, or something more complex like a Google Map or some kind of calendar or "social" widget. Blocks should "fall down" through the hierarchy (perhaps optionally) - meaning if you put a block on a parent page, child pages should inherit it automatically. The blocks should be prioritized, perhaps using a simple "weight" or "priority" number for sorting. The point is not to compose pages or build articles (such as is done in Concrete5, for example) - but something more along the lines of what StackBox CMS does, where content-locations ("positions" or "slots" or whatchawannacallit) can be shared... somehow ;-) Make sense? Is there a sensible (performant) way to approach this in PW? I'm thinking of one possible approach, which is to have these "blocks" actually be hidden "pages" with various templates, one for each kind of "block" or "widget" - located under a pair of hidden "left column" and "right column" pages in the hierarchy, which would determine the "block" order/priority by simply sorting them under these two parents. The page-templates can simply use the API to fetch the list of "block pages" for reach column, and render each of them in order. What I can't figure out is how you would achieve the "inheritance" effect - blocks "falling down" to subpages, based on the page-hierarchy itself. One idea that comes to mind, is to use tags - so for instance, if I tag a page with "advertising", any "block page" tagged with "advertising" would be fetched and displayed. To find inherited tags, however, I would have to actually walk up the page hierarchy and look for additional tags for which to query blocks. I suppose that would result in more overhead the deeper the page is nested - so maybe that's not a good idea? Can you think of better way (or more in tune with the "PW mindset") to approach this? Thank you for making this CMS available! I'm pretty excited about this, and I have a feeling this might be the (sane) Drupal-alternative I've been waiting for! ;-)