2

I have a website built with Drupal 7. Each page on the site can have an infinite number of child pages. Each page has "areas"; an area can be a thing such as left or right side bars that contain blocks, views or attributes/fields of the page content type (e.g., page.sponsor_ad_1, page.sponsor_ad_2).

I want the child pages inherit the areas of its closest ancestor page by default. A content editor can override it afterwards.

What's the best way to achieve this? What module does, completely or partially, what I need?

1
  • If you are looking to have ad tags for sections of a site which are overridable for specific terms I'm not sure there is a out of the box solution. I have seen this done for other sites and it was a reasonable amount of work. But it is doable. Commented Aug 2, 2011 at 16:26

1 Answer 1

0

It depends how arbitrarily flexible the layouts need to be but:

For the layout switching you could probably use Omega and Delta http://drupal.org/project/delta

Then write your own custom context condition that says "does this page have a parent with the layout X?" then use the reactions provided by Delta to switch to layout X for the closest parent.

For the defining/storing what layout is associated with each "page" you could just use the Field API. If each "page" is a node then it will be easier for you, otherwise you might have to also define a new type of Entity for your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.