Inheritance in Widget Framework

As described above, all of a publication's templates have the same top-level structure: Meta, Top, Main, Right and Bottom, for example. If a template (config.section.news, 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 Right area of the template contains widgets, then the Widget Framework will look in the config.section template to get the layout for the Meta, Top, Main and Bottom areas. If config.section is not complete either (if, for example, it's Top and Bottom areas are empty) then the Widget Framework will look in the config 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 Top (i.e header) and Bottom (i.e footer) areas in the config template, and then define standard layouts for the remaining areas in the config.section and config.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 config.section.name templates for those particular sections, and overriding just those areas that are different from the standard layout. Similarly you can, if necessary, create config.article.type templates for any content types that require specialized layouts.

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