On one of the Site Collections we have in SharePoint 2013, we created a custom banner. The banner is not displayed for users who have read-only access to that Site Collection. Is there away for us to fix it so that we can display this for everyone who has access to the Site Collecton? I'm looking for the following code:

<Sharepoint:SPSecurityTrimmedControl ID=”SPSecurityTrimmedControl2″ runat=”server” PermissionsString=”AddAndCustomizePages”>
<script type=”text/javascript”>
    document.getElementById(“s4-ribbonrow”).style.display = “block”;

In the Master Page, but that is not there.

  • Did you check the permissions on the image itself? It sounds like the Master Page is fine, but the permissions of the image might be off.
    – Taterhead
    May 3, 2016 at 15:17
  • also check if the content are published, and check the place of image
    – Waqas Sarwar MVP
    May 3, 2016 at 15:21
  • The permission for the picture is the same as the parent site. all pages are published
    – swimmerbhs
    May 3, 2016 at 18:38

1 Answer 1


Maybe I'm missing what you are trying to accomplish but why wouldn't you just create a table or div in the top of the in the table after the

    <!--Hide Ribbon if Read Only Permissions -->
  <Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="EditListItems">
    <script type="text/javascript">
        document.getElementById("s4-ribbonrow").style.display = "block";
<!-- Page Start -->
<table width="100%" cellspacing="0">
<td align="center">
<table  width="100%"cellspacing="0" border="0" bgcolor="#727272">
<tr class="ribbonUserInfo"><td align="center">
      <tr class="customBanner">
         <img src="imageurl.png" alt /> <!--  Put the banner here! -->
  • We want the banner to display for everyone even users with read only access.
    – swimmerbhs
    May 3, 2016 at 18:42
  • This should be completed if the image is correctly displayed on the master page unless the image is in a library that is not permissioned for universal access. If anything sounds like the document lives in a location that not everyone has at least read permissions to. May 3, 2016 at 18:45
  • Also if he is putting the content in the area of the code he specified only folks with contribute access and higher will be able to see it because they will be able to see the ribbon. If they have read only they will not see the ribbon and not see the image. I think the placement of the code is the issue. May 3, 2016 at 18:48
  • It is in the Site Assets folder, everyone that can visit the site has the same permissions in that document library. So everyone in the company has read access at least.
    – swimmerbhs
    May 3, 2016 at 18:50
  • 1
    I'm telling you my friend it's an issue with the placement of the code. Please see my example...I have a tr with the class customBanner that's where your snipit should start.[code]<tr class="customBanner"> <img src="imageurl.png" alt /> <!-- Put the banner here! --> </tr>[/code] May 3, 2016 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.