Members Area
You are not logged in.
Shopping Cart
Items: 0
The cart is empty.

Tips and Tricks

Helicopter 360
Advanced Contexts Manager
Content Enhancer

Examples and Tutorials

Content Enhancer
Visual Studio SourceShare
Title Manager
Use strict patterns

This article explains what are "strict" patterns and how you can use them to display different titles/breadcrumbs for different pages on your website.

Strict patterns are patterns that are only used when all of their items could be resolved. If you are not familiar with the pattern model you may read about it in the user manual.

We will start with an example of a very simple pattern that only contains one TEXT item.

Example: ExPattern

Item 1: TEXT item thet resolves to the name of our company(NameOfMyCompany).

This pattern always resolves to "NameOfMyCompany". This is obviously not very useful pattern. Let's add another item to it.

Item 2: SQL item that resolves to the name of the current Joomla article.

What do we have now:

Case 1: we are currently located on a page that displays an article

The pattern resolves to: NameOfMyCompany -> Name of current article

Case 2: we are currently located on a page that does not display an article

The pattern resolves to: NameOfMyCompany

The first case is obviously what we wanted to achieve. While the second case doesn't look bad, it is most likely that we would want to have something different there. Let's say that we have a photo gallery and we want to display "NameOfMyCompany -> Photos -> etc.". How to have both?

One of the possible ways to achieve that is to use strict patterns. If we define our example pattern as strict, then the system will always check if all of the pattern's items are resolved and if not the pattern will be skipped. In the second case the item that resolves to the current Joomla article will not be resolved and the whole pattern will be skipped. Then you can define another pattern that is used for the photo gallery and sets its priority to be lower than the first pattern.

Note: the given example is only to show you how the "strict" feature could be used. It might not be the best way to implement patterns on your specific website. If you want to always have the name of your company in front, then you must create a default starting pattern, not use the company name in each pattern.