The settings for contextual objects (contexts) is, at least from an information structure perspective, the most important and most interesting part of Page manager. These settings allow you to gather information from other parts of the website, and make it available to modify the page's behavior and content.
Contextual objects are added in two different ways (see figure 13.6):
- By manual selection, for example a specific user or node. You may also use this to add the acting user as a contextual object.
- By relationships to existing contextual objects, such as the vocabulary for a loaded taxonomy term, or the author of a given node. This is the most common way of adding contextual objects.
A third way of adding contextual objects is the argument settings. These are loaded by dynamic parts of the path of the custom page.
Figure 13.6: Contextual objects are one of the most important functionalities in Page manager. The settings allow you to load data from your website, making it available for the custom page.
How can this be used?
A custom page displaying a node could load the node author as a contextual object, thereby providing more options for use and show data related to the author.
On a site with a vocabulary section, used to categorize articles, a custom page for article display could load the viewed article's section as a contextual object, load the top parent term and (with Views) list more articles in the same top-level section.
|12.6 contexts.png||47.88 KB|