I found out about the SPSecurityTrimmedControl and supposedly it allows us to control web content on SharePoint. For example:
<SharePoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb" PermissionContext="CurrentSite">
<p>Not everyone can see this</p>
</SharePoint:SPSecurityTrimmedControl>
My question is, where can this be used? Can this be used only in SharePoint Designer? I tried inserting this code in a Script Editor web part but it does not seem to work.
SPSecurityTrimmedControl server side control is not supported to be embedded via Script Editor web part, instead you could enclose web part zone (WebPartZone) in SPSecurityTrimmedControl control (apparently the page that contains web part zone(s) needs to be modified for that purpose):
<SharePointWebControls:SPSecurityTrimmedControl ID="stc" runat="server" PermissionsString="AddListItems">
<WebPartPages:WebPartZone ID="Right" runat="server">
<ZoneTemplate>
</ZoneTemplate>
</WebPartPages:WebPartZone>
</SharePointWebControls:SPSecurityTrimmedControl>
From another hand you could consider to utilize Target Audiences to target web part to specific audiences:
Go to Edit page -> edit Web Part -> Target Audiences under Advanced group
Related
I have had an app targeted for SharePoint online which provisions a few custom lists and custom list forms that has been, and continues to work on my work Office 365 team site.
I made some changes to the app and on my developer account, references like:
<SharePoint:FormField runat="server" ID="FieldId" ControlMode="New" FieldName="FieldName" />
are not rendering at all on custom list pages, aside from one list, whose custom pages oddly appear to continue functioning.
I have been pulling my hair trying to figure the source of this for hours not to no end. I have even created an app that does nothing but provision a list and a custom form and on deployment to my developer account, form fields do not render (the HTML rendered on visiting these forms is something like this:
<span id='WPQ1f257f1df-1870-4fef-a590-4f29baa6e99bIPName' data-sp-control='SPFieldText' data-sp-options='{"mode":3,"source":"IPName"}'></span>
without the html input controls as it happens on the working form.
Hoping there is someone in here who may have ideas as to what could be the cause of this.
I want to customize the SharePoint 2013 online(office 365) "About me" linked page (personimmersive.aspx) to a custom look and feel.
Even clicking on any SPUser name, for ex in a list item modified by is "John Smith" if we click on it goes to about me page.
This page resides under mysite but I cannot see this page is SharePoint 2013 designer to edit, but modifying SharePoint pages in designer is not always the best way.
Can I just create a new page and redirect all Profile page request to that custom page?
IF I create app parts and edit the page I cannot edit the top portion of the page.
redirecting may not be a feasible approach, specially on the online versions
you can try to take advantage of web parts and css to do what you can
The biggest change is that you can’t edit the entire top portion of
the page. These used to be in a web part zone, and you could choose to
add/remove the web parts. Now they are fixed, with no ability to move
them around or change the parts.
We had removed the Activity Feed web part previously because we were
using Yammer newsfeeds and group feeds embedded throughout the site,
and this part always showed “No activities”. Now this is back again,
with no way to remove it, short of editing the page in SharePoint
Designer.
There are still web part zones on the bottom, but really the problem
is no control over the display of most of the top of the page.
http://weshackett.com/2014/04/office-365-new-profile-page/
There is personImmersive.aspx in SharePoint Designer, you should be able to find it in All Files. Just make sure you connect to [your_domain]-my.sharepoint.com instead of [your_domain].sharepoint.com.
you can't customize the page completely.However you can add custom web part and custom css to change the look and feel to a great extent.
#tiago duarte you can still remove the activity web part.This can be done using script editor webpart and hiding the complete block/div.
I have a SharePoint hosted app.
There is a list in that app, and it is brought through web part on the page.
<div>
<WebPartPages:WebPartZone runat="server" FrameType="None" ID="WebPartZone" >
<WebPartPages:XsltListViewWebPart
runat="server"
ListUrl="Lists/IdeasList">
</WebPartPages:XsltListViewWebPart>
</WebPartPages:WebPartZone>
</div>
Everything works well but there is one problem, in case of application updating the page on which is placed a web part is replaced normally (html a code), but the web part is duplicated (on the page one more copy of web part is added below).
How to add web part on the page that it wasn't duplicated in case of updating?
I had the same issue and what I did is to remove the webparts before update.
You can delete them manually via URL.
Another option is to implement an event receiver which will delete the webparts before.
Hope this helps you.
According to Microsoft, the SharePoint help pages present a security concern and should be disabled. Since we don't want users clicking on a broken help icon, it needs to be removed as well. What's the best way of removing the icon and the separator pipe that's to the left of it?
If you want to increase security, then hiding a link is not the best option for that. Disallowing access to the content page would be a better choice. If you run a small SharePoint farm, you can
open up IIS management console
find the web application responsible for the public portal
find the _layouts virtual folder
find the file help.aspx and open the Properties window for that file
change the access permissions for that file.
repeat these steps for "HelpSearch.aspx", too
You'll have to repeat these steps on all servers in your web farm.
Although naivists approach is secure, the end user will get an error message this way.
You can remove the link by inserting a small bit of JavaScript into every page. Doing this by hand is tedious, which is why you can use something like the free SharePoint Infuser to automatically output this JavaScript to each page. Note that it doesn't actually modify the page, it just adds script to it.
Plenty of examples are available.
After doing some research, seems that commenting out the following lines in the master pages does the trick for the icon. The separator still seems to be there though.
<td valign="middle" class="ms-globallinks">
<img align='absmiddle' border=0 src="/_layouts/images/helpicon.gif" alt="<%$Resources:wss,multipages_helplinkalt_text%>" runat="server">
</td>
In a number of different WSS and SharePoint sites we typically add a LeftNavZone to the default.aspx page using MS Office SharePoint Designer. I'd like to write a feature to do this programatically so it can be activated only on certain sites.
Is this possible?
I would like to add it within
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
You cannot add an WebPartZone to the Pages using a feature. You will have to manually do it, but whereas you can add an webpart to the page using this AllUserWebPart
The way you would normally do this is by creating a site definition using Visual Studio, in which you include all items that should be deployed to the site, like for instance the default page. This allows you control the creation of a new site.
Option 2 is creating a feature that does 2 things.
Deploy a new aspx called homepage.aspx to the site, this page contains the desired controls etc.
a feauture receiver that is executed when the feature is activated, which sets the site's homepage programmatically to be the newly deployed page.