Tassos Marinos Developer of Joomla Extensions

The URL Condition

Published in EngageBox
Updated 16 Feb, 2022

The URL Condition gives you the opportunity to make your box appear in specific URLs. The flexibility with this condition is quite high because of the fact that you can type in more than one URLs and on top of that you are free to choose just a part of the URL. This freedom means that you don't have to worry about future domain changes of your Joomla because you can ommit the domain name entirely if you so wish.

URL Display Condition


In the table below you can see which options are available to setup the URL Condition.

Name Description
Match Set whether to match or not the selected URLs.
URL In this textbox you can type in your URLs or parts of them one by one separating them in new lines.
For example, you can type it like this:

Or even like this:

Or even a mix of them if you'd like but there's rarely a use case for typing them mixed.
Use Regular Expression Power users should be familiar with the enormous potential of Regular Expression in finding matches with patterns on strings.
That's exactly what this option lets you use. It treats the URLs as Regular Expressions.

Use Case

A very common use case for the URL Condition is when you know beforehand that the URLs you're interested in will have a distinct keyword or phrase inside them and you want to target just that. That is usually the case when you're using an extension which uses URLs in a certain manner and you'd like your box to be displayable in only those pages.

Useful Notes

It's good to remember that since you are able to type in parts of a URL, there is a good chance that one URL will include another. For example:

  • /blog/
  • /blog/something-here

You can understand that the first URL part includes the second one because of the fact that it is already a part of the second one. In those cases, while it isn't really a problem, it is recommended to try and use choices which do not include one another.

Also, if you aren't familiar with Regular Expressions you're missing out! A very comprehensible tutorial can be found in RegexOne.

An example for RegEx would be the following, if you want to target URLs which start with the words "blue", "red" or "yellow" then you can target all 3 of them with RegEx like so, http(s?):\/\/joomla.org\/blog\/(blue|red|yellow)\/the-rest-of-the-url\/