- What is Advanced Contexts Manager?
- Why is “context-based” architecture a good thing?
- What content can I change based on contexts?
- What else can I do with Advanced Contexts Manager?
- How is a context (section) defined?
- I read that I can precisely define where a module is displayed with Advanced Contexts Manager. How is this done?
- I cannot configure my contexts. They are not working as they should. What to do?
Advanced Contexts Manager is a native Joomla 1.5 extension that allows you to define parts of your web site (we call them “contexts” or “sections”), and display different content based on which part (section) the site visitor is currently in. We call this “context-based” web site architecture. This is not just another way to structure your web site, it allows you to do things that you cannot do in core Joomla.
The Joomla architecture is based on sections, categories, articles, menus and a few other items. This is good for general web site development, but is sometimes not enough.
Let’s give an example: you want to show a specific module only when news are displayed. Using Joomla, it is only possible to show modules based on the selected menu. Joomla doesn’t know what “news” for your web site is. Even if you name your section “News”, for Joomla it is just another section. It is possible to create a menu item called News and bind the module to it. But what if an article from the news section is displayed without selecting the menu item? In this case the module will not be displayed. With contexts you can create a context that is called “News” and define it the way you like. You can then bind modules to that context.
Currently, you can change where a module is displayed and the parameters for the module. If you are using other products we offer, such as Breadcrumbs Manager or Title Manager, you can also use contexts to make their functionality context-dependant. We have planned to implement a way to have parts of articles that are displayed based on contexts. We have also planned to implement a feature that will allow you to execute actions based on the currently active contexts.
You can also: set HTML as a title of a module, use environment data (for example POST data) in module parameters. This is done by using the powerful “Module Enhancer” module that is included with the product.
A context is defined by conditions. Those conditions could be combined using logical operators: AND and OR. You can also use condition blocks to emulate brackets. There are some built-in conditions, for example: current article, category, section, current user, request data (POST, GET), session data, cookie data. You can also define your own conditions. For those who can code in PHP there is a PHP condition that is evaluated by invoking user-defined PHP script.
Defining where a module is displayed or changing its parameters based on where it is displayed is possible with Advanced Contexts Manager. We call this module enhancement. To use it you must utilize the special module we have created – the “Module Enhancer” module. You can enhance existing modules or enhance new, virtual modules. For more information, please see the manual.
Since contexts might get pretty complex, it is not always easy to understand why a context is not working (activated) as expected. That is why we have included debugging functionality in the product – it allows you to see which contexts are active on each page. This way you can narrow down the options and find your problems. The debugging option is turned on from the component parameters page.