Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Filter list-of-links links to audiences #707

Open
apetro opened this issue Feb 28, 2018 · 1 comment
Open

Filter list-of-links links to audiences #707

apetro opened this issue Feb 28, 2018 · 1 comment

Comments

@apetro
Copy link
Contributor

apetro commented Feb 28, 2018

Reminiscent of the retired-from-service "Dynamic Menu Portlet":

Add optional .audience field to links in list-of-links widgets, with value array of Strings representing group names. Filter away links that specify an audience none of the groups of which include the viewing user.

Punchline: whereas content like

{
               "launchText":"Open website",
               "links":[
                  {
                     "title":"Employee wellness",
                     "href":"https://uwell.wisc.edu/employee/",
                     "icon":"loyalty",
                     "target":"_blank"
                  },
                  {
                     "title":"Student wellness",
                     "href":"https://uwell.wisc.edu/student/",
                     "icon":"group",
                     "target":"_blank"
                  }
               ]
            }

currently usually shows a typical user two links only one of which is relevant, evolved content like

{
               "launchText":"Open website",
               "links":[
                  {
                     "title":"Employee wellness",
                     "href":"https://uwell.wisc.edu/employee/",
                     "icon":"loyalty",
                     "target":"_blank",
                     "audience": ["employees"]
                  },
                  {
                     "title":"Student wellness",
                     "href":"https://uwell.wisc.edu/student/",
                     "icon":"group",
                     "target":"_blank",
                      "audience": ["students"]
                  }
               ]
            }

would show only the relevant links to the user.

@apetro
Copy link
Contributor Author

apetro commented Mar 30, 2018

From discussions: a better way to do this is a better microservice vending the list-of-links JSON, avoiding more complexity client-side.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant