Tag Info

New answers tagged

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.


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


0

Changing Master page is very easy in SharePoint Using CSOM, we can give the Master Page URL in the web masterpage property, for reference u can check this link : http://www.sharepointsol.com/2015/01/apply-master-page-using-csom.html


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

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)


0

Each Site has a Master Page Gallery site/_catalogs/masterpage/... So you can add your master page and style files into the particular site. Then you can use Site Settings to change the Master Page instead of inheriting from the Parent (Site Collection).


1

The above answer is not right. It is totally unnecessary to touch corev15.css. These are the steps to apply custom CSS to SharePoint site hosted at Office 365. Find "Site Collection Features" setting and enable all features with name "publishing" in it. Find "Manage Site Features" setting and enable all feature with name "publishing" in it. Find "Master ...


1

SharePoint pages are, by default, associated with site definition files. When a master page is customized in SharePoint Designer, it is no longer associated with the site definition. This can result in additional administrative work following future updates or upgrades to SharePoint, which is why you see this message. You can always reset the master page to ...


0

If you are using the OTB Seatle.html master page then the sideNavBox area starts at line number 294. <div id="sideNavBox" role="navigation" class="ms-dialogHidden ms-forceWrap ms-noList"> You could place DIV with the logo inside it and play round with the placement within all the components, i.e all represent chunks of code when rendered in the ...


0

Eidt the master page in SharePoint Designer and add SharePoint:CSSRegistration. Example: <SharePoint:CSSRegistration name= "<%$SPrl:~SiteCollection/Style Library/Custom.css%>" runat="server"/> Source: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.cssregistration(v=office.14).aspx


0

in <head> tag of html file of your master page you can provide your css link as below <link href="/sites/SiteName/Style%20Library/CustomCSS/Customcss.css" rel="stylesheet" />


0

Foundation does not have the option as the "Sharepoint Server Publishing feature" is needed for allowing inheriting of masterpage by child sites from the parent site. However you can use powershell to achieve the same effect $site = Get-SPSite http://sharepoint $site | Get-SPWeb -limit all | % { $_.CustomMasterUrl = "/_catalogs/masterpage/CUSTOM.master" ...


-1

You can try with this style in either your master page or a css file: div#suiteBarLeft{ background-color: red; } In this example, the top blue color will be changed to red, you can change it to any color you want.


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


0

It is called the suitebar. If u are on premise you can change it. It is a web application property you can e.g set it with powershell as described here. http://sharepointryan.com/2013/04/16/customizing-the-sharepoint-2013-suite-bar-branding-using-powershell/ In SharePoint online you shouldn't change it.


0

I have added it following way. May be very odd! CSS <link rel="stylesheet" href="/sites/IFICTeamSite/SiteAssets/MasterPageCss/masterPageCustom.css" ms-design-css-conversion="no" />


0

Personally I'd put it into Layouts. Prevents accidental deleting or modification by clumsy site admins.


0

I had this recently and the problem was my local DNS going a bit mad. The site was at //site_location/ but for me to get to it/open in SharePoint designer I had to go to //site_location.domain.co.uk so whilst it opened fine and I could do most things, when it tried to update it was looking for //site_location (which it couldn't find) so wouldn't update the ...


1

ScriptLink directives will always look in the /_LAYOUTS/1033 directory for your script. If you are not deploying the files to the file system and instead using the Style Library, you need to use the standard <script> tag. <script type="text/javascript" src="http://2008-sp-2013-jc/sites/labeller/Style%20Library/jquery-min.js"></script> ...


0

Well then.. I spent hours looking for the answer, decided to ask here after pulling all my hair out, and I found the answer by playing around with the CSS! For anyone who googles this topic, rejoice for I have the answer and I'm going to actually share it! ANSWER: Don't put padding in #s4-mainarea, put it in .s4-ca! Here's all my CSS: #s4-bodyContainer { ...


3

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


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

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.


1

The follwoing code will try to load JQuery from Google CDN. If it fails, then it will look for a local copy of JQuery: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> </script> <script> window.jQuery || document.write('<script src="/_layouts/15/JQuery/jquery-1.7.1.min.js" ...


1

Here is script you can use to dynamically load jQuery if it not present. // Only do anything if jQuery isn't defined if (typeof jQuery == 'undefined') { if (typeof $ == 'function') { // warning, global var thisPageUsingOtherJSLibrary = true; } function getScript(url, success) { var script = ...



Top 50 recent answers are included