How attributes are searched in a page (inheritance of attributes)

To display a dynamic content in ηCMS we refer to attributes available in the context of the particular page, using: asm and asmAny HTTL methods. When accessing an attribute by its name, ηCMS uses the following algorithm to find the attribute.

  1. If the attribute explicitly belongs to the current page (as a part of assembly) it will be used. Otherwise, go to 2 step.
  2. Check the inheritance tree of the current page and look for the attribute in the parent assemblies. If the attribute is not found, go to step 3.
  3. Check the navigation tree of the page and search for attributes in accordance with steps 1 and 2 for every page. If an attribute with the specified name was not found, go to step 4.
  4. ηCMS determines a main page depending on the current request locale and system settings and examines a desired attribute for the main page, using steps 1 and 2. If the requested attribute was not found, HTTL directive asmAny returns null, directive asm also returns null and sends an error to the server console.

Despite of the many steps of this process, ηCMS fairly quickly solves the problem using an optimized access to the database and caching algorithms.