Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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. – Jeremy French Aug 2 '11 at 16:26

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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