Hot answers tagged

34

I have resolved the same issue using the my post. In Feature.xml add a reference to the Feature receiver class. <?xml version="1.0" encoding="utf-8"?> <Feature xmlns="http://schemas.microsoft.com/sharepoint/" Id="{35867BDA-82DC-418c-9005-79CCC363E3CD}" Title="blah" Description="blah" Scope="Site" ...


20

Did you remember to check in the master page? Site Actions > Site Settings > Galleries > Master pages and page layouts Find your master page, select it and select Publish then Approve


13

If you want to do it at page level, you can assign a different master page on "OnPreInit" event. Below is the example to do it on layout page if you have publishing site : public class MyPublishingLayoutPage:PublishingLayoutPage { protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); if ...


13

The log file should get you the path that SharePoint unsuccessfully tries to resolve. Try adding "~sitecollection" first in the ScriptLink like: <SharePoint:ScriptLink language="javascript" name="~sitecollection/custom/jquery-1.10.2.min.js" runat="server" Localizable="false" /> but this will only work inside the "the_new_osce_portal" Site ...


11

You can turn on the Publishing feature for the Root site and in the Site Action -> Site Settings -> Master Pages you will see a screen like below: Here you can specify to inherit the root-site master page for sub-sites! Also, if its just a CSS that you have used - at the bottom you can see an option to Specify a CSS to be used by this publishing site and ...


11

There are two kind of master pages in SharePoint Site Master Pages: used by all publishing pages – and only by publishing pages System Master Pages: used by everything else including forms and view pages You cannot change the default behavior – but you can use SharePoint Designer to change the master page assignment for individual pages if required. If ...


10

The short story: Usually you'll set the master page as both default and custom master page, the most common exception being a very customized master page for publishing which can't be used for ordinary pages in which case you'll only set it as custom master page. The full story: When creating pages in SharePoint your main options for setting the ...


10

It's in the 14 hive at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS


9

You have a couple options here (...I've used both successfully in the past): 1) Call _spBodyOnLoadFunctionNames.push("function()"); replacing function with the name of the function in your webpart. This will cause your function to be executed after the body of the page if fully loaded and in sequence with other startup client-side scripts. 2) You can go ...


9

You can copy any of the existing MasterPage's html file (I hope you have already figured that out) and go to Site Settings -> Design Manager -> Edit Master Page Now click your copied MasterPage and at the top-right you can see Snippets.. This is newly introduced in SharePoint 2013 and further explained here Now if you click Search Box, this will give you ...


8

As long as you dont customize (unghost) your page layout, updating through declarative feature should work fine. By any chance did you create your page layout in SharePoint designer? If you did, a little known "feature" is that even though you provision your page layouts with GhostableInLibrary they will be unghosted and hence you will only be able to take ...


7

My question is why on earth you'd want to remove core.js. It contains JavaScript functions which are useful even in a public-facing situation, and that's why you are getting errors. These include dropdown menu items, page layout manipulation, expand/collapse behavior on list views, etc. Remember that core.js will only be downloaded once per user when they ...


7

In the most concise terms I can think of - a Page Layout is used to display content, a Master Page governs the look and feel for the whole site. A Page Layout has an associated content type, therefore it stores content, and a page derived from a Page Layout will store the content in the content type's fields. A MasterPage does not have a content type and ...


7

There are many ways that you can approach this issue and it all comes down to what the desired functionality and behavior is for both the user and the content editor. One of the most common ways I have done this in the past is to use one master page that has all the publishing controls still in it. By default you have to be logged into a site for it to ...


7

Since respond.js is a presentational script, its placement within your HTML can dramatically impact page performance and execution time, especially on less capable browsers with slower JS engines. This module takes the guesswork out of placement and puts the script where it will be most effective. Optimal location is in the head after your CSS but before ...


7

Hardcoding is never a nice solution! Look in to the SuiteBarBrandingDelegate control: Elements.xml: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- SuiteBarBrandingDelegate (the top-left "SharePoint" text on a page) --> <Control ...


7

Use the MasterUrl and CustomMasterUrl properties of Web: using (var ctx = new ClientContext( url )) { var web = ctx.Web; var masterPageUrl = String.Format( "{0}/_catalogs/masterpage/oslo.master", ctx.Web.ServerRelativeUrl ); web.MasterUrl = masterPageUrl; web.CustomMasterUrl = masterPageUrl; web.Update(); ctx.Load( web ); ...


7

On the site collection level, the SharePoint Publishing Infrastructure Feature needs to be active, and on the web level, SharePoint Server Publishing needs to be active. If not, you are not allowed to change master page.


7

The master pages and page layouts are stored at site collection level and in master page gallery _catalogs/masterpage. But you can always have liberty to select different master page for each sub site or also inherit the master page from its parent which is a site collection. Webapplication won't have any master page for itself without a root site ...


7

In the 2nd statement you should have used the site collection specific TOKEN as in: <SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/PathToJqueryLib/jquery-1.10.2.min.js /> The issue with your 3rd (also known as Client-Side JavaScript library reference) is that such constructs do no recognize token-based ...


7

I exactly had the same problem. After some investigation and trying out different approches I finally found the solution: 1) Do NOT place the @Register-statement before the DOCTYPE declaration 2) Instead you can place it directly within your Custom ASP.NET Markup Snippet - just before the usage of your custom control Hope that helps!


6

I would not advice to edit the Seatle.master. Instead I'd advice you to just take a copy of it and rename + edit the copy. In that way, in case anything goes wrong, you still have a solid fallback masterpage. Why some may advice to edit the html version, that is to support the Design Manager - But that method is primarily opinion-based. Regarding your ...


6

In Init.Js there is a function called AllowCSSFiltersOnIE8(). It checks for IE version and if it is Ie8 or below. Adds ms-core-needIEFilter css class to body tag, then checks for border style on ms-hcTest, and if it is not applied, removes css filter for s4-workspace. So this element is just for checking whether there is a need to use filters or not. And ...


6

Add the ms-dialogHidden class to your outer div, it will hide the content in dialogs: <div class="ms-dialogHidden" style="background-image:url('/Style%20Library/lfr/header.jpg');background-position:left; background-repeat:repeat-x;height:147px;"></div> For more, see here: ...


6

MasterPage is allowed deployed at site collection scope. If you want to set your masterpage as default masterpage below are the common methods: Write code in a feature receiver. Through Powershell commands Through UI (SharePoint Publishing Infrastructure and SharePoint Publishing feature needs to be activated to do this.) Through SharePoint designer. Now ...


6

You can try using <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/My.css %>" After="corev4.css" runat="server"/> to resolve a full path in the masterpage, though I have a funny feeling that might only work in Publishing Pages...


6

This is a common problem when using multiple JavaScript libraries as many of them define $() SharePoint is using ASP.NET Ajax so if you include JQuery you should do that in noConflict mode. You turn that on using jQuery.noConflict(); Now $ will never mean jQuery unless you use constructs like: jQuery(document).ready(function($){ /* code using $ */ ...


6

Hi custom master page is site master page used for publishing pages only and default master page is system master page, to know more please leaf through this article http://rehmangul.wordpress.com/2009/12/15/master-pages-in-sharepoint/


6

First of all, never, ever modify v4.master. That is a Microsoft page and will likely be replaced/updated in a future service pack and then poof, there goes your master page :) Create a copy of it and use that instead. If you put the web parts in the standard web part zones in the master page, all new pages that do not have content defined for those zones ...



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