Below you find all the available conditions, which can either be easily set with the Editor Button, or manually entered in the plugin tags.
Near each option you find the respective attribute and values that can be used in the tag. The manual syntax for the {show}
or {hide}
tags is the same seen in the above examples of the Tutorial:
{show condition="value1,value2" condition="value1,value2"}...{/show}
Menu Items
In addition to single Menu Items, it's possible to automatically include or exclude all current and future menu items placed under a menu type.
Selection | menuitems |
Select the menu items to assign to. Values: ID of the menu items |
Home Page
Unlike selecting the home page (default) item via the Menu Items, this will only match the real home page, not any URL that has the same Itemid as the home menu item.
This might not work for all 3rd party SEF extensions.
Selection | homepage |
Values: true , false |
Date & Time
The date and time conditions use the date/time of your servers, not the ones of the visitor's system.
Date
Start Publishing | date |
Enter the date to start publishing Format: 2019-11-23 16:30 |
Finish Publishing | date |
Enter the date to end publishing Format: to 2019-11-30 23:59 |
Seasons PRO
Selection | seasons |
Select seasons to assign to. Values: winter , spring , summer , fall (= autumn ) |
Months PRO
Selection | months |
Select months to assign to. Values: 1 - 12 (= January - December) |
Days of the week PRO
Selection | days |
Select days of the week to assign to. Values: 1 - 7 (= Monday - Sunday) |
Time PRO
Start Publishing | time |
Enter the time to start publishing. Format: to 16:30 |
Finish Publishing | time |
Enter the time to end publishing. Format: to 23:59 |
Languages
Selection | languages |
Select the languages to assign to. Format: en-GB |
Joomla! Content PRO
This condition is based on what Joomla content page is displayed, including Page Types, Categories, and specific Articles.
Page types
Selection | contentpagetypes |
Select on what page types the condition should be active. Values: archive , article , categories , categoryblog , category , featured , form |
Categories
Selection | cats |
Select the categories to assign to. Values: ID of the categories |
Articles
Selection | articles |
Select the articles to assign to. Values: ID of the articles |
If you want to go deeper with Articles-based conditions, you can use another Regular Labs Extension, Articles Anywhere. Articles Anywhere features If Structures, that allows you to check against the value of any article data, attribute, as well as custom fields.
An example of what you would be able to do with Articles Anywhere If Structures:
{article}{if my-custom-field = 5}...{/if}{/article}
Tags PRO
Selection | tags |
Enter the tags to assign to. Use commas to separate the tags. Format: Fluffy,Cuddly |
Match all | tags |
Select to only let the condition pass if all of the selected items are matched. Use a plus to separate the tags. Format: Fluffy + Cuddly |
Access Levels
Selection | accesslevels |
Select the access levels to assign to. Format: Guest,Registered |
User Group Levels
Selection | usergrouplevels |
Enter the user groups to assign to. Use commas to separate the user groups. Format: Manager,Administrator |
Match all | usergrouplevels |
Select to only let the condition pass if all of the selected items are matched. Use a plus to separate the user groups. Format: Manager + Administrator |
Users PRO
Selection | users |
Select the users to assign to. Values: ID of the users |
Components PRO
Selection | components |
Select the components to assign to. Format: com_content,com_contact |
Templates PRO
Selection | templates |
Select the templates to assign to. Template Format: protostar Template Style Format: protostar--9 (add --id ) |
URL PRO
The URL conditions allow control over specific pages or groups of pages, with support for Regular Expressions.
URL matches | urls |
Enter (part of) the URLs to match. Use commas to separate each different match. Format: my-url/,my-page/ |
Use Regular Expressions | urls_regex |
URL parts will be matched using regular expressions. So make sure the string uses valid regex syntax. Values: true , false |
Case Sensitive | urls_casesensitive |
Url parts will be only match if casing is exactly the same. |
Devices
Selection | devices |
Select the devices to assign to. Keep in mind that device detection is not always 100% accurate. Users can setup their device to mimic other devices. Values: desktop , tablet , mobile |
Operating Systems PRO
Selection | os |
Select the operating systems to assign to. Keep in mind that operating system detection is not always 100% accurate. Users can setup their browser to mimic other operating systems. Values: Names of operating systems |
Browsers PRO
Browsers | browsers |
Select the browsers to assign to. Keep in mind that browser detection is not always 100% accurate. Users can setup their browser to mimic other browsers. Values: Names of browsers |
IP Addresses PRO
IP Addresses / Ranges | ips |
A comma seperated list of IP addresses and IP ranges. Format: 127.0.0.1,128.0-128.1,129 |
Geolocating PRO
Geolocating is not always 100% accurate. The geolocation is based on the IP address of the visitor. Not all IP addresses are fixed or known.
To be able to use this condition, you need to install the Regular Labs GeoIP library.
Continents | continents |
Select the continents to assign to. Values: Names of continents |
Countries | countries |
Select the countries to assign to. Values: Names of countries |
Regions / States | regions |
Select the regions / states to assign to. Values: Region codes |
Postal Codes | postalcodes |
This can only be used for a limited number of countries and IP addresses. Format: A comma separated list of postal codes ( 12345 ) or postal code ranges (12300-12500 ). |
Custom PHP PRO
This gives you the opportunity to assign to just about anything you can think of. You just need to know what PHP code you should use.
With PHP you can call on all data/information available in the variables, url, database, etc. And then do your checks on this data. You can tell the control the display by ending the PHP code with a return true or false based on your checks.
For examples and ready-to-use PHP scripts, check out the "Using Custom PHP Conditions" guide.
Custom PHP | php |
Enter a piece of PHP code to evaluate. The code must return the value true or false. Format: return ( $user->name == 'Peter van Westen' ); |