Tag Info

Hot answers tagged

6

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.


6

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


5

How about something like this: <script type="text/javascript"> _spBodyOnLoadFunctions.push(function(){ ExecuteOrDelayUntilScriptLoaded(showStatusAlert, "sp.js"); }) function showStatusAlert(){ var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var list = web.get_lists().getById(_spPageContextInfo.pageListId); var ...


5

As I suggested in a comment to another answer, there are numerous ways to accomplish this that don't involve deploying server-side code into SharePoint. Here are a few that I could think of, I may have left some out; each have some advantages and possible challenges. TL;DR: Use the JavaScript injection pattern (especially with SharePoint Online - -- this ...


4

After trying out different options available online, I was able to achieve it by JavaScript <!--SPM:<SharePoint:ScriptLink ID="ConfigurationScriptLink" Name="~sitecollection/SiteAssets/js/FileName.js" runat="server"/>--> CSS <!--SPM:<SharePoint:CssRegistration ID="CSSCustom" Name="&lt;% ...


3

You can't change the .master file when it's bound like this, you can only edit the .html file. It will re-generate the .master when you save the .html. This is due to the Design Manager packet in SP2013. Here's the MSDN article on this feature set: http://msdn.microsoft.com/en-us/library/office/jj822363(v=office.15).aspx


3

Perhaps your issue has something to with something SharePoint Designer is doing. Try resetting the master page to the site definition, then download a copy of your master page from the master page gallery using the web UI. Rename the file and make a minor modification and upload it back via the web UI with the new name. Then select the new master page in ...


3

The preferred way now to reference styles in SharePoint 2013 is to upload them to the master page gallery, you can create a folder in your master page gallery and upload your CSS file there either manually or using a module in Visual Studio. Once you do so, you can refernce it using : <SharePoint:CssRegistration name="&lt;% ...


3

Update an oslo.css is not recommendable approach because it can break other elements which you might not find even. You should check with developer tools about the CSS. Which CSS is breaking the layout and try to override that CSS with your custom CSS in the masterpage. Here is the great solution Responsive SharePoint available that you can use with ...


3

You can open top level site then Site Settings -> Master Page -> Check Reset all subsites to inherit this site master page setting and click Ok This will set top level master page to all Sub Sites.


3

You can't delete the copy because it is associated to the Seattle.html file. What you have to do is create a copy of the Seattle.html file to. This will create a copy of the html file (Seattle_copy(1).html) that you need to rename to anything you want, maybe "delete" as an example. Doing this will give you a dialog that asks if you would like to update the ...


2

You can't really get the SharePoint master page, but you can inherit the look and feel of SharePoint by using the 'Chrome Control'. Here's a walkthrough: http://msdn.microsoft.com/en-us/library/office/fp179916(v=office.15).aspx


2

Turns out that when I was saving a site as a template, SharePoint forgot to put the CustomMasterUrl attribute into the configuration section of the ONet.xml file. I had to export the site template (as a WSP file) and import that file into Visual Studio 2010. Then I added the missing attribute, so the full string was as follows: <Configuration ID="0" ...


2

A Site Collection cannot have a Parent Site Collection, A Site Collection can only have child Sub-Sites. So to answer your questions: 'test.mycompany.net' is not a parent to the other site collections. It didn't inherit because there is no parent-child relationship. Only subsites would be able to inherit the masterpage. In order to 'share' a ...


2

$siteUrl = "http://ukreddy:3456/" $siteCollection = Get-SPSite $siteUrl Enable-SPFeature "PublishingSite" -Url $siteCollection.Url -force Enable-SPFeature "PublishingWeb" -Url $siteCollection.Url -force http://ukreddysharepoint2010.blogspot.co.uk/2014/05/error-systemargumentexception-value.html Sharepoint was failing to activate the feature PublishingWeb. ...


2

Page Title is rendered as Try this .ms-core-pageTitle { font-size:2.77em; white-space:nowrap; color:pink; /*Let us test colour*/ font-size:9.77em;/*make it huge*/ /*You edits here*/ } Override the above in you master page or custom css file.


2

There is no explicit DENY when it comes to SharePoint permissions. In this case I would not use that particular group. I would create a new SharePoint group with all of the same members minus the individual(s) you do not want to have access to that page. I would stay away from assigning individual permissions on a user-to-user basis. You are absolutely ...


2

Since you are using SharePoint 2013, you can either use JSOM or REST API to read the data. This is happening on the client side, and it will be easier to add it to respective DOM elements (or create new elements). JSLink is a good option, but implementation will take more time. I prefer REST as it's much easier to implement and performs better.


2

I would go for a User control with server side code. The UC can read from a list you (or the user control itself) creates and then create HTML from that result. You can then style the HTML with CSS if needed I would use HttpCache or similar to cache the final HTML for as long time as you think is viable for your use case (note that an IISRESET will clear ...


2

You can do so by changing the CSS for that control. The control is implemented differently in On Premise than O365, so here's how to change it in both scenarios: Office 365: .o365cs-base.o365cst .o365cs-topnavBGColor, .o365cs-base.o365cst .o365cs-topnavLinkBackground{ background-color: red; } This is to change it to red color for example. In an on ...


2

You can edit the master page HTML file and then add your CSS & JS references. The best practice is to take a copy of seattle.html (html master page) and then work on that. SharePoint online refer custom css and javascript in MasterPage (Site Assets)


2

If you just want to add a custom CSS and JS to your master page, then instead of creating a new master page, try the following and check if it works for your purpose. For Custom CSS : Use the Alternate CSS Url to set a custom CSS File. For referring a custom JS file follow this approach - ...


2

Check if the safe control entry is there in the web.config, if not, add it, then the masterpage should work. Basically when you "edit" the masterpage you are unghosting it and that causes the Sharepoint to use type-safe parsers for all unghosted content.


2

using (var ctx = new ClientContext( url )) { var web = ctx.Web; var masterPageUrl = String.Format( "{0}/_catalogs/masterpage/SPCCapatech/FullWidth_SideBar.master", ctx.Web.ServerRelativeUrl ); web.MasterUrl = masterPageUrl; web.CustomMasterUrl = masterPageUrl; web.Update(); ctx.Load( web ); ctx.ExecuteQuery(); } ...


2

Master page gallery is present in the root web of the site collection. So, whether a master page is applied to a root site or any sub site, it is the server relative url of the root site collection which is needed. Consider that you have a sub site under the root site collection: http://aissp2013/sites/pub/s1. Here is the code to apply master page to it: ...


2

One workaround is: Enable the Publishing feature at site collection now browse this page sitecolelction/_layouts/15ChangeSiteMasterPage.aspx Now you can change the master page for all subsite.


2

You can try the below script to change the masterpage for all subsites. $site = Get-SPSite http://portal/sites/collaboration $site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = "/sites/collaboration/_catalogs/masterpage/custom.master";$_.Update() } $site.Dispose() Changing the master page on SharePoint sites with PowerShell Also check this ...


2

You should never change an existing "system" SharePoint master (if you update SharePoint those updates can potentially overwrite the "system" masterpages, removing your customizations. If you want to change things, copy the SharePoint master which you are currently using (see answer of Amal Hashim). Copy that masterpage (e.g. with SharePoint designer). And ...


2

Media Queries If you want to be in control of what happens, you could use a custom design in your Master Page. In the masterpage you need to set different css-files based on viewport, like this: <!-- Responsive CSS-files based on width --> <link type="text/css" rel="stylesheet" media="only screen and (min-width: 1024px)" ...


2

I had the same issue and as you said none of the CSS of Script did work for me as well. So I have to patch something with below script. This should be considered as a last option if you have any other solution available. So if you try this, you will have your issue fixed with below script: var interval = null; //Defines the start interval variable ...



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