Hot answers tagged

6

CSOM Using the ClientContext, get your Site object and check its URL SPContext.Current.Site.ServerRelativeUrl : if == "/" JSOM For that you can use the _spPageContextInfo variable. To check if user is in root site collection vs any other site collection, check this variable : _spPageContextInfo.siteServerRelativeUrl : if == "/", then is the absolute ...


2

Source: http://www.sharepointrelated.com/2015/03/30/change-site-collection-url-sharepoint/ $site = Get-SPSite http://servername/customer/questions $site.Rename("http://servername/customer/generalquestions") And you have more detailed info in http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=573


1

First of all, there is no way to do this using the GUI, You have to rely on the PowerShell. there are 2 options in Powershell. use the Copy-Spsite Copy-SPSite http://contoso/sites/OldTeam -DestinationDatabase WSS_Content -TargetUrl http://contoso/sites/NewTeam Now Run the Remove-Spsite to remove the old site. Another option is Using the BackUp and ...


1

You could compare the ID with the RootWeb: clientContext.Load(clientContext.Site.RootWeb, rw => rw.Id); clientContext.Load(clientContext.Web, w => w.Id); clientContext.ExecuteQuery(); var isRoot = (clientContext.Site.RootWeb.Id == clientContext.Web.Id) ? true : false;


1

Can you get to Central Admin? Can you try to create a new site collection? How about PowerShell? Try to see if your Distributed Cache is up and running. Here is a good msdn article about troubleshooting your Distributed Cache. https://blogs.msdn.microsoft.com/sambetts/2014/03/19/sharepoint-2013-distributed-cache-appfabric-troubleshooting/


1

A project site, ProjectSite#0, is a standard SharePoint project site template. A Project Web Access site, PWA#0, is a special template for those using Project Pro/Project Web Access for project management. If you don't have anyone using MS Project, stick to ProjectSite#0 templates.


1

Projectsite is new template introduced in the SharePpint 2013, that site does not required the Project server licensing. You can read in depth about this template over here: On the PWA templates called project web app which are part of Project Server( Project service Application) and required extra configuration. i.e project server configuration, provision ...


1

SPSite.RootWeb is the object you're after, in server side code ( http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.rootweb.aspx). SP.Site.get_rootWeb() in client object model code ( http://msdn.microsoft.com/en-us/library/ee552834.aspx). To get root site collection, SPSite rootSiteCollection = mySiteCollection.WebApplication.Sites[0]; ...


1

Please try below code <img src="<asp:Literal runat='server' Text='<%$SPUrl:~sitecollection/sitecollectionimages/MyImages/test.png%>' />" />


1

<script type="text/javascript" src="../../JSLibrary/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="../../JSLibrary/jquery.SPServices-0.4.8.min.js"></script> <script type="text/javascript"> $(document).ready(function () { var managerName; var userName = ...



Only top voted, non community-wiki answers of a minimum length are eligible