close

Filter

loading table of contents...

Blueprint Developer Manual / Version 2304

Table Of Contents

5.4.2 Navigation and Contexts

Requirements

Websites are structured into different sections. These sections frequently form a tree hierarchy. For example, a news site might have a Sports section with a Basketball subsection. The website of a bank might have different sections for private and institutional investors with the latter having subsections for public and private institutions.

Sections are also often called "navigation" or "context". Usually the sections of a site are displayed as a navigable hierarchy (a "navigation" or "site map"). The current location within the tree is often displayed as a "breadcrumb navigation".

Navigation in the Site

Figure 5.9. Navigation in the Site


Additionally, efficient content management requires reuse of content in different contexts.

For example, reusage of an article for a different section, a mobile site or a micro site should not require inefficient and error-prone copying of that article.

Solution

A site section (or "navigation" or "context") is represented by a content item of type CMChannel or CMExternalChannel which is a child of CMChannel. Sections span a tree hierarchy through the child relationships of CMChannel#children. If a CMChannel is referenced by a CMSite item it is considered a root channel, that is an entry into a channel hierarchy representing a website. The CMChannel content items fulfill the following purposes:

  • Hierarchy: They form a hierarchy of site sections which can be displayed as a navigation, sitemap, or bread crumb. Each site consists of exactly one section tree.

  • Context: They function as contexts for content. Content can be reused within different contexts in different layouts and visual appearance. For example, an article's layout may differ in a company's blog section from its layout in the knowledge base.

  • Page: Each CMChannel can be rendered as an overview page of the section it represents. Therefore, the CMChannel contains information about the page structure (the "grid") for this overview page and the pages generated when content items are displayed in the content of the CMChannel.

    For more information on how web pages are assembled in Blueprint also refer to the Section 5.4.4, “Page Assembly” section.

  • Configuration: CMChannel content items contain settings which configure various aspects of the site section they represent. Each CMChannel can override parent configuration by defining its own layout settings, content visibility, and other context settings. If for example, the "News" section of a site is configured for post-moderation of comments this configuration can be overwritten to premoderation in the subsection "News/Politics".

    For more information on settings see the section Section 5.4.3, “Settings”.

The context in which a content should be displayed is determined whenever a URL to the content is created. In a simple website with no content reuse all contents only have a single context and link building is very simple. For more complex scenarios Blueprint includes a ContextStrategy for the following purposes:

  • Generate a list of the available contexts for a content (the ContextFinder).

  • Determine the most appropriate context for the specific link to be built (the ContextSelector).

The DefaultContextStrategy in Blueprint uses a list of ContextFinders to retrieve all possible contexts for a content item and a single ContextSelector to determine the most appropriate one from the list.

Most notably, there is a ContextFinder that utilizes special configuration contents, so-called "folder properties". Its logic to retrieve contexts is as follows:

  1. Determine the folder of the content item.
  2. Traverse the folder hierarchy starting from the folder in step 1 to the root folder looking for a content item of type CMFolderProperties named _folderProperties.

  3. Return the contents of the linklist property contexts of the found CMFolderProperties content item.

The ContextSelector in CoreMedia Blueprint is the NearestContextSelector. From the list of possible contexts for a content it selects the context closest to the current context.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.