Inheritance in the Widget Framework

As described above, all of a publication's templates have the same top-level structure: Meta, Outer, Header, Top, Main, Aside, Bottom and Footer, for example. If a template (, for example) has widgets in all of these sections, then the news section of the publication will take all of its layout from this template. If, however, only the Aside area of the template contains widgets, then the Widget Framework will look in the config.default.section template to get the layout for the Meta, Outer, Header, Top, Main, Bottom and Footer areas. If config.default.section is not complete either (if, for example, it's Outer, Header and Footer areas are empty) then the Widget Framework will look in the config.default template for the missing information.

This inheritance mechanism makes it very easy to create a standardized layout for a whole publication, and only create specialized layouts where you actually need them. A typical approach is to define a standard layout for the Header and Footer areas in the config.default template, and then define standard layouts for the remaining areas in the config.default.section and config.default.article templates. If your publication has a very standardized layout, then this may be sufficient. If, however, some of your section pages have significantly different layouts, then you can achieve that by creating templates for those particular sections, and overriding just those areas that are different from the standard layout. Similarly you can, if necessary, create config.default.article.type templates for any content types that require specialized layouts.

The Sports section in the following illustration takes its Header and Footer layouts from the config.default template, and its Top, Main, Aside and Bottom layouts from the config.default.section layout. The News section, however takes its Aside layout from the template, which overrides the Aside layout in config.default.section:

The following sections describe the specific inheritance mechanisms used for different types of page.