How to show and hide components in the same page
|In some cases we want a page to show different options, such as menu, banner or message, depending on the profile of the user viewing it.|
|To achieve this we can resort to the web components used to set permissions for the roles that will be able to view it.|
So, the first thing to do is create the web component from the “Design → Web Components” option and then go to the “Configuration → Permissions” option and set the roles that will be allowed to view this web component.
In this way, we set that anonymous users can view a certain component and those who are logged in can view another one.
Below is a video that illustrates how to do it.