Forum Discussion
vassp1980
Jul 11, 2024Copper Contributor
Show/Hide a button webpart in sharepoint online based on group of logged in user
Hi Guys, I need recommendation on a requirement that I have regarding controlling visiblity of a "button" webpart in SharePoint based on the M365 group of the logged in user. For example if l...
- Jul 11, 2024Instead of using the button web part, could you use the Quick Links web part in a button layout? The Quick Links web part supports audience targeting as well as choosing to open the link (or not) in a new tab. This would get your outcome with no special code required - just a different web part that does support targeting.
vassp1980
Copper Contributor
Hi Susan,that worked like a charm 🙂 Thanks so much for the timely help, really appreciate it.
Susan_Hanley
Jul 12, 2024MVP
Glad it helped! There is another "hack" that I used to use before you could choose to open Quick Links in a new tab. You can create a 1 column/1 row table and add text that opens in a new window. It looks like a button, but it's really just a table column. One of the nice things about this approach is that you can take advantage of the different color options in table styles. But the button layout of Quick Links looks better!