I have two functions that add CustomAction to the SiteSettings page. One of the features is at the Site level, and the other is at the Web level.
CustomAction, added at the Site level, is a link to a custom configuration page that controls the site level settings for my application. Therefore, I do not want the link to appear on the SiteSettings page of the child site. I know that there is a parameter (RequireSiteAdministrator) that hides the page in accordance with the access level, but I still would like this page to be displayed for site owners on the top-level / root-level site settings page, and not on the sub-site settings page .
For the CustomAction xml node attribute, there is a RootWebOnly attribute that would solve my problem. The problem with this attribute is that it is only available for SandBoxed solutions.
I know that this is possible, as I see the link behavior for site collection administrators in the Users and Permissions section of the Site Settings page. Please note that if you go to the top / root level settings page, you will see this link. On the other hand, if you go to the site settings page on a subsidiary site, the link no longer exists.
I tried using HideCustomAction, but this hides the link on both pages.
source share