I'm making a site using Drupal 8 and I have several roles defined, one of them is Writer. I made a view to show as a tab in the user profile pages called Backlist. If the user is a writer, they can add a list of their books they have written. Everyone visiting the site has access to the backlist information under that tab. What I'm trying to do is make it so the tab ONLY shows in profiles that are writers.
This is very similar to this question: Hide views tab display on user profile to profile owner That answer didn't work for me because it seems that the 'hide view' is no longer in the validation settings.
As I have it now, the tab shows all the time, and if there's no content, it just shows a message. So is it possible to hide a views tab, in a profile, based on the owner's role?
Contextual filters:
Configure contextual filter: User: User ID
validation criteria: User_ID
Restrict user based on role: Writer
Action to take if filter value does not validate: Display Contents of No results found
Configure contextual filter: User: User ID validation criteria: User_ID Restrict user based on role: Writer Action to take if filter value does not validate: Display Contents of No results found
If there was something like "Hide View" in the actions that probably work, but it's not listed.Action to take if filter value does not validate