Conditional Content

For this block version 8.4.0 is required! This is because the necessary event (on_block_before_render) is not present in earlier versions.

The cool thing about this add-on is that it lets you render blocks only if certain conditions are met. The add-on comes with a few built-in condition types, but you can also extend this and create new conditions if you are a developer.

Only render a block

  • On a specific weekday. Example use case: if you have a pizzaria and your customers can buy a pizza for only $5 on Tuesdays you might have a block you only want to show on that / those days.
  • Randomly. This will randomly show or block, or not.
  • Depending on visitor's country. You can hide or show a block depending on the country the user is in. The Geo Location service is used for this. E.g. you might only want to show a "Visit our store" button if the user is actually in the same country.
  • Depending on a user's attribute. E.g. if you have a user attribute 'Gender', you can only show the block for Females or Males, for example.

Important notes

  • concrete5 version 8.4.0 or higher is required
  • Compatible with PHP 5.6 and higher
  • If full page cache is enabled, this add-on won't work as expected
View in marketplace