Tag Info

Hot answers tagged

28

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


12

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


8

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


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

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

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


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


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


6

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


6

If your goal is to have a different look and feel for different users, you can use a single Master Page, and include steps that only target specific profiles (anonymous users in your case). Search the internet for the following terms: SPSecurityTrimmedControl and AnonymousTemplate. It is what I use on this draft page: http://usermanagedsolutions.com For ...


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

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


6

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


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

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


6

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


5

You can navigate to the master page gallery via the root site Site Actions>Site Settings>(Galleries)Master pages and page layouts. Then select the master page file you want and click Download a Copy from the ribbon. The url for the master page gallery is: http://server/_catalogs/masterpage


5

If you want to copy your master page to another site collection you can download your master page from the master page gallery and upload it to the the master page gallery of the second site collection. From the root site Site Actions > Site Settings > (Galleries)Master pages and page layouts If you want to deploy the same master page to multiple site ...


5

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


5

Try this for the first link as it is intended to address exactly what you are seeing, though certain controls do not expand the value. <CustomAction Id="script1" Location="ScriptLink" ScriptSrc="~SiteCollection/Style%20Library/mySolution/custom1.js" /> As to whether it should be in _layouts or Style Library is a debate that has raged since the ...


5

You should have Type="GhostableInLibrary" attribute for your preview. I suppose MasterPages in your solution points to a document library. If you want to provision files from a module to a document library, ghostableinlibrary type must be used: Specifying GhostableInLibrary means the file will be added to a document library in SharePoint together ...


5

There are custom SharePoint CSS classes that you may need to overwrite to change the colour of the hovering. Using IE developer tools I found that the two classes you're looking at are .ms-welcome-hover and .ms-siteactions-hover the welcome hover class obviously being the top bar for the page. This code in your custom CSS should change it to a blue ...


5

If all resources for the branding marked (MasterPages, CSS, JS) as Ghostable or GhostableInLibrary then it looks like they where stored in the content database. The files will be directly loaded from the feature directory. They are not as long as you don't modify those files directly inside of SharePoint. If you then update your solution the files will be ...


5

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


4

Is the JScript running server or client-side? If server-side, SharePoint's safe mode parser will block the request. This is SharePoint's protection mechanism to deal with the fact that end users can add content to SharePoint pages. If client-side, it could be the same issue, I'm not 100% sure. Assuming it is indeed the safe mode parser which is preventing ...


4

My recommendation would be to go to the Site Settings as Marc indicated. From there under Look and Feel you will see the Master Page link. Click on this and take a look at some of the selections. For instance, if you want to inherit master from parent select the appropriate radio button. Another way to confirm the master pages is by looking at the code ...


4

The Communitiy Kit for SharePoint changes the master page dynamically. You can find a code sample in the latest CKS changset. Drill down to EBE -> CKS.EBE -> CKS.Blog. It is in the BlogHttpModule.cs in the BlogHttpModule_PreInit method. You will need to add the HttpModule to the web.config. For an example of that, check the WebAppFeatureReceiver.cs in the ...


4

Heather Solomon's site should be your first port of call, has everything you need to know about customising the look and feel of SharePoint. http://www.heathersolomon.com/blog/ EDIT: this is mostly 2007, but most of the principles are the same for 2010.


4

Please, try to add List="116" attribute to your Module element, as it is shown in this MSDN how-to: http://msdn.microsoft.com/en-us/library/ms441170.aspx <Module Name="MasterPages" List="116" Url="_catalogs/masterpage"> <File Path="MasterPages\custom_main.master" Url="custom_main.master" /> </Module>


4

Try to forget the past and get comfortable with SharePoint Designer. It is not perfect, but it is a useful tool to have available, and is greatly improved over the 2007 version (and FrontPage ;-). If you want a master page for your solution package, a good way to do it is to work in SPD to do the editing until you get what you want, then download a copy to ...



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