Web Pages - Inheritance - Polymorphism Back TOC Next

Web pages, or just pages on short, are the central units of any website. Your website consists of a number of connected web pages each containing different page components. One of the pages is the Home Page, the entry page to your website.

From the perspective of their content and appearance, pages can be independent to each other or in some relationship.


Inheritance provides an easy way to ensure consistent look and feel across any number of pages. For example the company logo, although displayed on all site pages, it can be changed everywhere with a single update.

A page extends another page, called Base Page, when it inherits default attributes and components, if any, from the Base Page. It means any future modification in the Base Page will be automatically propagated into the inheriting pages. This relationship can be unlimited nested, e.g. page A extends page B, page C extends page B, and so on. Any number of pages can extend the same page.

Inheritance is indicated on the main menu using indentation. In the image below Page E and Page F extend Page A, Page G extends Page E and Page H extends Page G. Therefore the Page H will contain all components defined on pages A, E, G and H. The default attributes for a type of component on Page H is the last one defined on Pages A, E, G and H.


The inheritance relationship, if needed, is set at the creation time and cannot be reversed. If a Base Page is deleted, then all its extended pages will inherit from the Base Page of the deleted page, if any. In the image above, if the Page G is deleted the Page H will inherit from Page E, if the Page A is deleted, Page E and Page F became independent pages.


Any page can be inserted as a component into another pages; therefore it is used as a container to group different components desired to appear similarly in different pages. Such containers will use the default attributes of the hosting page.

A container can be inserted into a page or removed at any time. Future modifications in the container page will be automatically reflected in the hosting page.


FoxSet Studio provides polymorphism, the ability to present the same content in different formats and / or in different contexts.

  1. Polymorphism through containers. Containers are formatted according to the defaults of the hosting page; therefore including the same container in different pages with different formatting attributes will display the same content in different formats in the context of each hosting page.
  2. Polymorphism through inheritance. Inheritance allows extending content and attributes but the attributes can be overwritten, therefore the same content can be imported in different pages differently overwriting the formatting.

Please note that page components imported through inheritance keep their original absolute position on page while page components imported through containers keep only their relative position to each other as the container can be anywhere positioned on the hosting page.