UI Builder Footer, UX Page Property : Hide a link depending on connected user role ( chrome_footer )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 04:55 AM
Hello,
I am trying to configure the footer in the Shopping Hub workspace.
The footer should be composed of different links that redirect to different portals and lists.
One of the link should be displayed conditionnally, depending on the user roles.
I updated the UX page property chrome_footer of the workspace as follow but it doesn't work, the second link is not hidden if the user does not have the required role.
{
"public_page": {
"enable_footer_topbar": false,
"footer_topbar_options": {},
"enable_footer_bar": true,
"footer_bar_options": {
"enable_links": true,
"max_links_count": 5,
"links": [
{
"id": 3,
"type": "route",
"label": {
"translatable": true,
"message": "my purchases"
},
"itemValue": {
"route": "purchase_list"
}
},
{
"roles": [
"my_custom_role"
],
"id": 4,
"type": "route",
"label": {
"translatable": true,
"message": "my todos"
},
"itemValue": {
"external": {
"url": "/myportal"
}
}
}
]
}
}
}
I would really appreciate any help !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 05:00 AM
The issue you're facing might be that the chrome_footer UX Page Property is treated as a static JSON object. The platform does not natively (as far as Im concerned) evaluate properties like "roles" within this structure to dynamically hide or show links. It simply ignores the roles key and renders the link for everyone.
To achieve conditional visibility based on user roles, you might actually need to generate the entire footer JSON object dynamically before the page loads. The standard and most effective way to do this in a workspace is (as far as I know) by using a Scripted Data Resource.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 05:49 AM
I see, it makes a lot of sense. But it is a bit confusing because, with the chrome_header I did not run into this issue.
Is there a way to configure the footer so that it can run with a Scripted Data Resource ? Is there a macroponent I can update ?
Or should I create one from scratch ? If so, how to create a custom footer ?