Add new announcement text link viewable by permissions

I created a Content query web part on my home page which is from an announcement list from a sub site. I wanted to add the "Add new Announcement" link below it, but want it only viewable to those who have access to do so in the actual list.  

Is this at all possible? If so, how can i accomplish this?

Thanks.


  • Edited by Rick131 Friday, February 20, 2015 4:06 PM
February 20th, 2015 5:59pm

Hi Rick,

I recommend to export the announcement list web part from the sub site and then add it to the page where the Content Query web part exists and then use code to hide the items parts.

How to export and import the announcement list web part, please refer to the link below(remember to change the webid to be the webid of the sub site):

http://techtrainingnotes.blogspot.com/2009/03/sharepoint-one-library-multiple-sites.html

https://alexandrebarault.wordpress.com/tag/get-webid/

http://www.learningsharepoint.com/2010/11/12/sharepoint-2010-how-to-exportimport-a-webpart/

After adding the announcement list web part to the corresponding page, add the Content Editor web part to the page too.

Add the code below to the Content Editor web part:

<style>
.ms-listviewtable{
display:none;
}
</style>

After that, the page will display the web part like below image shows and only users who have permission to create items in the announcement list can view the link:

Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2015 4:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics