Hot answers tagged

12

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


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


5

You can use ~sitecollection instead of ~Site <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/awesome.css %>" runat="server" /> For html master page, it will be: <!--SPM:<SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/awesome.css %>" runat="server" />-->


4

Typically I create a module to host master pages, deployed to _catalogs/masterpage, a mapped layouts for css and a mapped images for images. If you want to store at the site level, you can use modules for that too. e.g. mp module <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Module ...


3

That is possible but you will have to use a trim control and custom script in the master page to append the recycle bin to the menu. Something like this will do the trick <SharePoint:SPSecurityTrimmedControl PermissionsString="ManageWeb" runat="server"> <script type="text/javascript"> document.getElementsByClassName('root ...


3

You should be able to insert your HTML code in a copy of the default master page you are already using, download it locally and and then publish it and set it as masterpage for your sites using O365 dev PnP Powershell cmdlts. As i'm not using O365 myself i haven't been able to try it out but should be doable. OfficeDevPnP.PowerShell Commands There are ...


3

You can also use the SharePoint Color Palette Tool. It helps to build your custom colors or just make a copy and adjust one of SharePoint own palettes.


3

The best is : make a copy of your seattle.master (custom_seattle.master) add your js reference in a scriptlink tag <SharePoint:ScriptLink Language="javascript" Localizable="false" Name="/_layouts/JS/myFile.js" runat="server"></SharePoint:ScriptLink> in the head of your masterpage put your js file referenced in the masterpage in the Layout ...


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


3

Yes, the Links in the QuickLaunch are static, but... You can make a link to a static Redirect Page (or Custom APSX Page), where you extract the link to OneDrive and redirect to it with window.location= They will see a blank page.. or make a nice redirect text (just in case somewhting goes wrong in your script)


2

The quick and dirty version (no external CSS file) $webApp = Get-SPWebApplication http://****:26611/ $webApp.SuiteBarBrandingElementHtml = '<div class="ms-core-brandingText"> <a class="ms-core-brandingText" style="color:white" href="/" >Wp</a></div>' $webApp.Update() Might need an !important, I'm not connected to a farm to try it ...


2

If your site is a publishing portal then all pages will be created in library called pages. 1. Page created from site actions not seen in designer. Once you create your page from site actions do following to check for a page in designer Open your publishing site in Designer and click on All Files tab from left menu. Now from the listed menu options, ...


2

Matt, You can create an user control to handle this in code. You can then add the control to the master page. Take a look at these two examples and let me know if I can assist. Inject dynamic javascript using MasterPage Programmatically add JS/CSS to pages


2

The "Pages" library is a publishing page library and will use page layouts. The "Site Pages" library can have completely different content types, most likely wiki pages or web part pages. Don't confuse the two types of libraries. They use completely different architectures. A good summary of the different kinds of libraries can be had here: ...


2

In SharePoint 2013, you have the flexibility to use HTML file to edit the master page and it will be converted to .master file automatically. That means you can edit the .html version of master page in any Editor (Text editor or Html editor like Notepad++, Dreamweaver, Visual Studio etc.). During editing you can place different SharePoint controls on ...


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

Here's a comparism I did some time ago: To get more input i also created a question on SO. Device Channels Yes I'm talking about Device Channels even when they are not mentioned in the question, because they can deliver the best performance and optimizability for the enduser and the client - in my opinion :) Pro individual ...


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


2

If you access this from the server itself what happens? If you get a good page the problem is in the delivery (you may need to add your URL for loop back exemption before you can do this). you probably have a application firewall and/or proxy device between the workstation you are browsing from and the servers them selves, blocking the traffic. If for some ...


2

You can try following taken from here. It is recommended for adding in html master page. <!--SPM:<SharePoint:CssRegistration ID="CSSCustom" Name="&lt;% $SPUrl:~sitecollection/SiteAssets/css/FileName.css %&gt;" runat="server" After="Themable/corev15.css"/>--> I did this in ugly way! <link rel="stylesheet" ...


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

reference Search for ID="PlaceHolderTopNavbar" Bring the Sharepoint:AspMenu control outside of this placeholder and delete asp:ContentPlaceHolder tag


2

You can't set it globally but what you can Download your master page Download all design files like css & js Now upload everything in your new site collection and also publish. PS: as your environment is SPO, you can utilize Designer Manager.


1

Assuming $site_url is defined correctly, add /'s to your MasterUrl and CustomMasterUrl as following: $site = Get-SPSite $site_url foreach ($web in $site.AllWebs) { $web.MasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/custom.master"; $web.CustomMasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/custom.master"; ...


1

The problem is your usage of ServerRelativeUrl. ServerRelativeUrl always starts with / and ends with the rest of the URL to the site. For instance, server-relative URL of http://server/sites/site01 is /sites/site01 (no ending /). However, in the case of a root site collection (i.e. http://server), the server-relative URL is simply /: it starts and ends ...


1

I found I needed to add it, check it out, call update, check it in and publish it. So: $web = Get-SPWeb $site $folder = $web.getfolder("_catalogs/masterpage") $files = $folder.Files $mPage = Get-Item "C:\path to your\masterpage.html" $file = $files.Add("masterpage.html", $mPage.OpenRead(), $true) $file.CheckOut() ...



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