Tag Info

Hot answers tagged

7

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 ...


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 ...


5

Since your file in _layouts directory, why not to use GetGenericSetupPath method? Something like this: var path = SPUtility.GetGenericSetupPath(@"TEMPLATE\LAYOUTS\MyPoject\data.xml");


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

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

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

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" ...


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

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

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

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

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 ...


1

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.



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