Contains Condition

Contains condition is used to assign a template to page(s) URL of which contains the specified string.

In the Condition field , you should specify the part of the URL that should be available in the page URL. Note that you should not specify domain name in the string.

Example 1: Assign template to all pages with URLcontaining specific word

To assign a template to all pages URL of which contains the word category , you should use the following code:

category

The sample page URLs given below match this condition, so template will be assigned to them:

http://www.mysite.com/categories/category1/

http://www.mysite.com/categories/category1/product_catalogue.aspx

http://www.mysite.com/categories/action/category3-discount.aspx

http://www.mysite.com/articles/category.aspx

Example 2: Assign template to all pages in English

The Contains condition can be used to render pages text on which is written in the same language. For example, to apply template to all pages written in English, you should use the following code:

lang=en

The sample page URL given below matches this condition, so template will be assigned to it:

/blog/?page_id=153& **lang=en*