Overview

For each widget, you can set display conditions to display the widget only for certain users or usergroups, in some articles, categories, components, between dates or hours, on mobile devices and languages. You can define needed conditions, or except conditions.

This is a very powerful way to manage easily your content inside modules, or inside any Joomla content.

Plugin events. You can define your own custom events before displaying any widget, for example onRenderPart. See plugin events

 

Instructions

The display conditions are available in the premium subscription.

Go in the configuration screen of your widget. In the "Display" options, then "Conditions" tab. Change the "Display" setting to "Custom conditions". The choose one or more conditions.

 

Use case

Here are some use cases :

- display some content in a panel widget inside an article only for registered users
- display some content (text, buttons...) only for non registered users (use the except registered users condition)
- prepare some content for events in a widget and set in advance a date from wich the widget will be displayed automatically
- set display conditions for your Joomla modules. Use a panel widget with a Joomla module in it. Set display conditions for the widget.
- display in a module a list of artcles of a category (Widget list of Joomla articles), with a condition on this category without needing to use fake menus.

 

Users

Access levels

You can choose one or more access levels needed to display the widget. You can define access levels in Joomla administration. They can be affected to usergroups.

User groups

You can choose one or more usergroups needed to display the widget. You can define usergroups in Joomla administration. For esch user, you can define one or more groups.

Users

You can choose to display or hide a widget to one or some users, without needing to use accesslevels or usergroups.

 

Pages

Home page

 

Menu items

You can choose one or more menu items. The widget will be displayed only if the current menu item belongs to your selection.

Categories

You can choose one or more articles categories. The widget will be displayed only if the current page is an article that belongs to one of the selected categories. This is useful for widgets as module inside a position.

Tags

You can choose one or more articles tags. The widget will be displayed only if the current page is an article with one of the selected tags.This is useful for widgets as module inside a position.

Articles

You can choose one or more articles. The widget will be displayed only if the current page is an article that belongs to your selection.This is useful for widgets in module inside positions.

 

Date and time

Date

You can set a date from wich or until wich a widget is displayed, or hidden. You can also define a date and a time. Use the following format : yyyy-mm-dd hh:mm:ss.

Examples
2018-12-01 to display only from the december 1, 2018
2018-12-01 12:00 to display only from the december 1, 2018 at noon

 

Time

You can set a time from wich or until wich a widget is displayed, or hidden. Use the following format : hh:mm:ss. The widget will be displayed each day, but only after or before the time you have defined.

Month

You can select one or several monthes in wich the widget is displayed, or hidden.

Day of week

You can select one or several days of the week in wich the widget is displayed, or hidden.

 

Devices

You can define here on wich device the widget will be visible.

 

Language

You can choose to display the widget only in one or several languages.

 

Operations

The display conditions apply to the widget. They are part of the stored settings in the widget record (table #_nge_parts, field params).

 

Before the widget is displayed in your Joomla page, the display conditions are checked before.

If you are logged as adminsitrator in front-end, the widgets will become visible while the page is unlocked for editing.