We often want users to be able to select the contents of their interest when our site contains numerous publications in it.
To solve this need, there is the ‘User preferences’ GXportlet which works in combination with the ‘Content’ GXportlet and the categories associated with contents.
At the GXportal, contents may be classified by categories and values (sub-categories).
The first thing to do is then create the categories for our contents, and their values, if applicable.
As we add contents to the site we assign the corresponding categories.
We must set the ‘Show customized contents’ property with YES at the GXportlet where we publish our contents. . This property acts as a filter. This means that, we will be showing the user -on the contents published in the ‘Contents’ GXportlet- those contents classified in one of the categories that the user has selected as preferred.
Additionally, we add the ‘User Preferences’ GXportlet to a page where the user will save his/her preferences.
In the ‘User Preferences’ GXportlet we can set up the possibility for users to select only categories, or categories and their values as well.
For the case where the site has no contents matching the categories that the user indicated as preferred, no contents will be shown. But we may configure a customized message in the ‘Contents’ GXportlet, indicating, for instance, something like “there are no contents of your preference”.
And in the case where the user is not logged-in, we may set up the following:
-
That no content be shown.
-
That no content be shown and a message be included.
-
That all contents be shown.