Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Working on a public facing SharePoint Foundation 2010 site with anonymous access enabled. Anonymous/authenticated access to content works as expected without problems so far.

Accessing the Blog with anonymous displays an "Alert Me" link on the homepage which, once clicked, opens a login prompt. This is rather confusing to anonymous users hence I want to hide it.

I managed to hide it via CSS but would rather prefer a server-side method.

Digging around I was able to locate the lines in question inside the blog.xsl stylesheet used by the XsltViewWebPart on the startpage.

Does anybody know if it is possible to add a SharePoint SecurityTrimmed control inside the XSLT and what permission would be required to hide the "Alert Me" link for anonymous users?

share|improve this question
    
Do you mind sharing how you hid the alert me via CSS? or what you did for a solution. I have the same issue. –  user9170 Jun 28 '12 at 13:21
    
I'm in progress moving to another country without having access to my development VM. Please remind me by end of next week once I've settled down. Thanks! –  Sig Weber Jun 28 '12 at 20:27
add comment

2 Answers 2

The easier method would be to remove the Create Alerts option form the Read permission level and it won't be an option for users.

Go to Site Actions, Site Settings and click on Site Permissions. In the ribbon click Permission levels. Here you can click on the Read permission and edit it or click the Copy Permission Level button to create a new permission level.

This would allow you to have an authenticated user read only level so they could receive alerts and an anonymous user read permission level with no alerts.

share|improve this answer
    
Sounds good. Will give it a try and post back here. Thanks! –  Sig Weber Nov 14 '11 at 14:01
    
I seem to be too dumb to figure out how to remove the Create Alerts option form the Read permission level only for anonymous users. Any hint where to look? –  Sig Weber Nov 14 '11 at 14:20
    
updated response. –  PirateEric Nov 14 '11 at 14:39
    
Thanks for the pointer! Followed your steps but now my authenticated readers don't have the alert link but anonymous still have it :( –  Sig Weber Nov 14 '11 at 15:03
    
If you created a custom permission, make sure the anon users have that permission level applied to the blog and authenticated users have the default Read permisions at the list level where the alerts should be removed. –  PirateEric Nov 14 '11 at 15:16
show 1 more comment

Create a new parameter to the XSL and retrieve the current user from SharePoint. Then only show the alert IF the paramter has a value.

share|improve this answer
    
Do you have an example how to add the parameter for the current user? –  Sig Weber Nov 15 '11 at 6:59
    
    
Thanks! But this is for a SharePoint 2007 DataFormWebPart/DataViewWebPart using SharePoint Designer 2007. I'm looking for a way to change the SharePoint 2010 XsltViewWebPart blog.xsl source without SharePoint Designer 2010. How would I apply the info you supplied in that case? –  Sig Weber Nov 15 '11 at 12:17
    
The concept is the same...I'll create an example and post it to my blog. Give me a few minutes. –  websch01ar Nov 15 '11 at 13:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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