Question

I need to register 3 different CSS that are in the 15 hive in the masterpage. I have it in the following format and I checked the link thru IE address bar and they seems to resolve. Why then it's not being effective when I apply the masterpage?

<SharePoint:CssRegistration  ID="Brand1" Name="<% $SPUrl:~SiteCollection/_layouts/15/brand/brand.css%>" runat="server" After="corev15.css" />
<SharePoint:CssRegistration  ID="Brand2" Name="<% $SPUrl:~SiteCollection/_layouts/15/branding/HidePT.css%>" runat="server" After="corev15.css" />
<SharePoint:CssRegistration  ID="Brand3" Name="<% $SPUrl:~SiteCollection/_layouts/15/branding/TitleBGColor.css%>" runat="server" After="corev15.css" />
Était-ce utile?

La solution 2

The following format helps.

<!--SPM:<SharePoint:CssRegistration runat="server" ID="CssRegistration1" Name="&#60;% $SPUrl:~sitecollection/Style Library/style.css %&#62;" After="corev15.css"/>-->

Source: http://yakovenkomax.com/cssregistration-and-scriptlink-done-the-right-way/

Autres conseils

You can use something like this:

<link href="indigo_layout.css" rel="stylesheet" type="text/css" ms-design-css-conversion="no" />

Look at this blog post about "Applying Custom Styles to Page Layouts in SharePoint 2013" it can be directly applied to a masterpage.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top