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


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

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)


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

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

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


2

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


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

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

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

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

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

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

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

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

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

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


2

Follow below mentioned steps. Inside the current site's Site Settings, navigate to Site Collection Administration > Site Collection Features. Activate SharePoint Server Publishing Infastructure if it's available... if it's not, you may be using SharePoint Foundation. Navigate to Site Actions > Manage Site Features, and activate the SharePoint Server ...


2

User Custom Actions (ScriptLinks) can apply one JavaScript file to your whole Site Collection or one Web (site) I used it in the recent New Library View which doesn't have a MasterPage or JSLinks and wrote a short note on my learning for the Yammer group: SP FrameWork ►Client-Side◄ https://www.yammer.com/itpronetwork/#/notes/2872092 [ok, I just checked ...


1

To provision the master page, you can use the old school method of applying the master page on the root site and all sub sites using the feature activation event. Also, don't forget to add an event receiver to apply the master page for newly created sites. This can be triggered on a web provisioning event. Beware that you will have to re-engineer the whole ...


1

Security trim snippet used to display content to specific people as per the permissions of the user whether users having permissions or not. We can add this security snippet to SharePoint master page or page layout. Security trim panel may contain other objects like webparts, components or static content. You can check this links, ...


1

Posting comment as answer I don't think it's because it's in the Master Page gallery. I just checked and it works fine. Is your master page in the same folder as /_catalogs? On checking using <link type="text/css" rel="stylesheet" href="CSSFile.css">, I get only the name of the file in the href part and not /_catalogs. Make sure CSS reference is ...


1

There are two master pages for each site like Site Master Page and System Master Page. When you go to the site settings page, then SP applies System Master Page. So make sure both master pages are same. Your both master pages may be same, then alternate css could the issue for hiding your button.


1

Learning is making a thousand mistakes The SharePoint DOM structure is not an easy one, add the whole dynamic part where server or client side code can change layout. And you get a more complex page than any webpage out there. If you don't know webdesign HTML/CSS then start with the basics, just like you started with a simple colorbook many moons ago. ...


1

Turned out to be a simple fix, not sure how this got removed when we reloaded the content DB but instead of ~subsite/folder/page I needed /~subsite/folder/page thanks to anyone who devoted any time to trying to figure out what the issue was.


1

Instead of JavaScript we can make respective changes in master page. Assuming you are on SharePoint 2013 on-premise. If you notice in the seattle.master file, you can find a div with ID siteIcon which is responsible for redirection. Refer below. <div id="siteIcon" class="ms-tableCell ms-verticalAlignTop"> <SharePoint:AjaxDelta ...



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