Custom Widget Binding Page
Control panel
⇒Widgets
⇒Add page
This section is not about a custom page that is displayed on the site but a custom rule, to which already existing site pages are subject. Pages that are selected by this rule form a group, to which you can bind widgets.
For example, you would like to display a widget only in three places on the site. In this case, you can create a page that describes these places and bind widgets to it.
Page name
It is displayed only in the tree in the Widgets section of Control panel.
Positive masks
A list of URL templates on the basis of which site pages will be selected. One template per row. Templates may contain substitution symbols:
*
- any sequence of symbols%
- any number
Specify URL that is relative to the site root excluding host and subfolders (if InstantCMS has been installed into a subfolder).
Example 1.
An article has the followng address on the site: http://your-site/articles/my-article.html
. You would like to bind widgets to it. Positive mask:
articles/my-article.html
The addres of the «Astronomy» articles section: http://your-site/articles/astronomija
. To bind widgets to its main page:
articles/astronomija
or, additionally, to all its subsections:
articles/astronomija articles/astronomija/*
Example 2. You would like to bind widgets to three user profiles. Their IDs - 4, 23, 42. Positive masks:
users/4 users/23 users/42
Or to the profiles of all users whose ID begin with 6 and end with 9:
users/6%9
Example 3. You would like to bind widgets to all pages whose address contains the word «special». Positive mask:
*special*
Or only to photo albums whose address contains this word:
albums/*special*
Example 4. You would like to bind widgets to all pages whose address ends with a digit. Positive mask:
*%
Negative masks
Operate in the same manner as positive ones. The difference is that widgets will not be shown on pages that are subject to these masks.
Example.
You would like to show a widget in profiles of all users except administrator (his ID = 1). Then, use a positive mask:
users/%
and a negative mask:
users/1