Sharepoint 2013 Problems Part 2

Added Script Web Part – Edit Page no longer works!
I was trying out some custom javascript on my home page, and after saving, clicking the Edit Page links no longer worked.

I found help on StackExchange, simple solution, just add

?contents=1

to your URL and disable the Script Web Part.

Hiding navigation links (left bar) & Settings MenuĀ for specific User Group

I found a solution using the SPServices, find it here

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://yoursite/SiteAssets/jQuery/jquery.SPServices-2014.02.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$().SPServices({
operation: "GetGroupCollectionFromUser",
async: false,
userLoginName: $().SPServices.SPGetCurrentUser(),
completefunc: function(xData, Status) {
var $xml = $(xData.responseXML);
console.log('xml', $xml.find('root').html());
if($(xData.responseXML).find("Group[Name='Visitors']").length == 1){
$("div.DeltaSPRibbon").hide();
$("div.ms-cui-ribbonTopBars").hide();
$("#suiteBarButtons").hide();
$("span.menu-item-text").each(function() {
if($(this).text() == "Store Overview") {
$(this).hide();
}
if($(this).text() == "Travel Rates") {
$(this).hide();
}
});
}
}
});
});
</script>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s