Tag Info

Hot answers tagged

8

If you can deploy to _layouts (i.e. not restricted to sandbox) and you anticipate needing these libraries across many site collections, I would deploy them to a folder within _layouts. Generally, it's good practice when deploying into _layouts to deploy to a subdirectory within _layouts, something like "_layouts/MyCompanyOrMyProduct" to avoid file naming ...


8

Since your file in _layouts directory, why not to use GetGenericSetupPath method? Something like this: var path = SPUtility.GetGenericSetupPath(@"TEMPLATE\LAYOUTS\MyPoject\data.xml"); UPD: This method is obsolete in SharePoint 2013, you should use GetCurrentGenericSetupPath or GetVersionedGenericSetupPath Thanks for noticing that fact in comments.


5

Don't do it, you will break your farm. Also, you'll leave it completely unsupported and the next service pack or cumulative update will probably just replace it. What is it you need to do? There'll be a better, supported method for what you want to do without renaming out-of-the-box system files. Edit your question and provide some more information, I'll be ...


3

SharePoint requires the WelcomePage to be a sitepage (not in _layouts), if it isn't it'll use default.aspx, so you have to introduce a redirect page as I suggest as answer to the question Change default site in Sharepoint foundation Or you can just use Sharepoint Designer to give default.aspx the content I suggest for redirect.aspx


3

The blog post rendered by xslt transformation. In this case you should change XSL template for your posts in 14\TEMPLATE\LAYOUTS\XSL folder. You can use this post as start point to understand how does it work.


3

They should be in a site collection so that css designers can change them without having to go through a system modification process with the server admins. Even though the files cannot hurt anything, typical sys mod procedures require multiple approvals and scheduling which is excessive and unnecessary for style sheet changes.


3

You need to modify the XSLT generated to create your custom look. Once you add your DVWP, SPD adds the XSLT to the page. If you switch to split view, you can click your DVWP, and the code block will be highlighted. Before you modify the XSL directly, there are a couple of things you can do to make it easier. Select the base layout that is closest to ...


2

Yes it could be done by directly editing the subnew.aspx page, but I tend to stay away from editing internal files for several reasons (like support from Microsoft). Although the approach mentioned by Kit Menke is supported by Microsoft, it creates additional burden because you have to maintain a copy of each layouts file and keep them synchronized in case ...


2

Depending on what you're doing, a less-invasive option would be to store data in the property bag for the web application, which would avoid the need to modify the web.config. You can use the SharePoint Property Bag Settings 2010 project to add/manage property bag keys, or create them with PowerShell or an Event Receiver.


2

There is a web.config in Layouts folder. Turn off errors in that file. Ref: http://msdn.microsoft.com/en-us/library/ms460914.aspx Or you can also turn on developer dashboard which will also show you the stack trace information. $service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $addsetting =$service.DeveloperDashboardSettings ...


2

If you deploy your web service to the layouts directory, you may run into some unexpected behavior with your web service. ISAPI is the best practice location to deploy any custom web services. This is because this folder is set up to serve your web services via wswsdl and wsdisco. As explained by James Tsai in his article Where do you deploy custom ...


2

As far as I know, code-behind usage in SharePoint requires you to specify the full assembly name of the assembly that contains the codebehind class (that is - assuming that your assembly is deployed to the gac). Please see if by using the full name your problem is resolved, ie: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Frameset.aspx.cs" ...


2

This "error" occurs when you manually change the file directly in the layouts folder instead of through the solution w/ deploy. Try deleting the js file from the layouts folder on the drive, check that the js file is included in the package file in your solution, then deploy the solution. It should put a fresh copy of the js file into the layouts folder on ...


2

can you deploy your solution to both the 14 and 15 hive? Check out this link: http://technet.microsoft.com/en-us/library/ff607534.aspx and the compatibilitylevel parameter. Install-SPSolution $SolutionName -GACDeployment -Force -Confirm:$false -CompatibilityLevel {14,15}


1

You need to use an administrator account to perform this action. If you use a non-admin account you'll get your mentioned error, or what I got through testing on a non-admin account: Set correct privilegies in Admin > Office 365 > Users and Groups. Select the name you want to make admin (with a global admin account) and select settings: When you're ...


1

You can remove it by modifying the PlaceHolderPageTitle placeholder in your page layouts. You can make it 100% custom, or add something to the default browser title (PageTitle FieldValue). More details


1

There are 2 types of "pages" that SharePoint uses in Lists/Libraries: views - such as in AllItems.aspx Forms - DispForm.aspx & all. The one you are referring most likely is the default view, such as in AllItems.aspx. One thing you could do is to enter that page in edit mode (append PageView=Shared&ToolPaneView=2) and add any other web parts (note ...


1

If you can't find another answer besides the codebehind (I doubt you will) simply create a base class for your pages that applies the rule: public class MembershipRoleLayoutsPageBase : LayoutsPageBase { public override void OnInit(EventArgs e) { //check permissions, redirect otherwise } } On MyAppPage1.aspx public class ...


1

Basically each page in _layouts is just a template because page is filled with data from list item, doc. library file etc. Each page here defines the "layout" - design, so it's a good name. Of course, it could be called pages, but someone decided to name it layouts. I don't think there is some special meaning behind the name of this folder. If there is ...


1

I know this question was asked a while ago now, but for anyone else with a similar problem, I would personally avoid using the site template approach. Perhaps a better solution (IMO) would be to create a separate site-scoped feature as suggested by Ted N.. The Web App scoped feature would still create the new site but could also activate any site-scoped ...


1

I recently ran into the same requirement for a company Blog where several authors are posting articles but the visitors should not see the author name. The simple approach is to use the following CSS, e.g. add it to your masterpage, to hide the author: .ms-rightblogpost div.ms-PostFooter span.ms-postfootercolor:first-child, .ms-rightblogpost ...


1

Since you are putting the file in layouts, can I assume this is a file that going to remain static, and not be edited? If that is the case you might like to try an alternative method, and that is to take advantage of the .NET resource framework. Rather than put the xml file in the layouts folder, create a resources file in your VS project (eg Strings.resx) ...


1

While I'm not 100% certain, I suspect that your problem is that you are using a SharePoint-specific method to access a file that is not actually in SharePoint. Everything in /_layouts/ is actually in the underlying file system of the server. What might work better on a lot of fronts is to move your templates into Sharepoint, either in their own document ...



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