I can see how to hide a view if certain value are field in a table record. But does anyone know how I can hide a menu tab (that would contain the hidden views) completely.
What I want to do is something like.
IF X is true then hide the menu tab.
That is because for UX, it makes no sense to show the menu tab in the header if the contents of that tab are not relevant to the specific type of record.
Just to be clear, I am talking not about the items within a page, but the menu that runs across the very top in the HEADER and serves as the navigation aid between sections. All I get when I select to hide-views from the Page Rules are the views within that page, there is not link to actually disable the header tab.
Indeed. That can only be done by CSS. You could disable it on some targeted pages.
or…
you could copy your page, and when clicking on a link send it to the copied page where the menu is disabled from the Page Settings.
This would be quite tricky to do, but is possible using the api. Unfortunately even then it wouldn’t be very efficient.
Without the API you would need the field on every page in the app to check if X was true.
Using the API :
You could hide the menu tab in CSS then, when the page loads, do an API call to get the value of X, check the value and then show the Menu tab. There would be a delay in the tab showing while your waiting to get the value.
If this would interest you then let me know and I’ll help if I can.
Thanks I’m just going to use a VIEW where it says something like “This is not available for your current plan” and set that against a criteria that I can check. It’s not perfect, but it’s a solution. Thanks for your help working through this and to @MichaelG
Maybe the page in question could be included (its Views) in a page of higher level. This way you wouldn’t have to hide the menu of the page, and have many flexibilty to create and hide a menu for views.
In my App I use A LOT those page and view rules because I have 4 roles different for each user, and 5 options that apply to the whole App (Saas multi companies).
And 2 years ago I also had notifications of the type “This page is not authorized.”