So registrieren Sie ein benutzerdefiniertes CSS mit v4.master, ohne die eigentliche Datei zu bearbeiten

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/83759

Frage

Ich möchte einen benutzerdefinierten CSS mit v4.master hinzufügen. Möchten Sie jedoch nicht die eigentliche Masterseite selbst bearbeiten.

Die Idee ist, die benutzerdefinierte CSS auf der Wiki-Seite zu laden.

Haben wir irgendwelche Möglichkeit, es zu tun?

War es hilfreich?

Lösung

In addition to Eric's post

You can use also use ScriptLink together with Custom action and inject your CSS into the ScriptLink section of masterpage - All without editing a master page (see the sample below)

   <CustomAction 
        Id="MyCustomCSSWiki" 
        Location="ScriptLink" 
        ScriptBlock="document.write('&lt;link rel=&quot;stylesheet&quot; After=&quot;Corev15.css&quot;  type=&quot;text/css&quot; href=&quot;../_layouts/14/MyCustom/Styles/BrandingWiki.css&quot;&gt;&lt;/' + 'link&gt;');" 
        Sequence="202" />

Andere Tipps

If you don't want to modify the master page, then the alternative is to go into Site Settings and click on Master Page in the look and feel section and in there add your custom css file into the Alternate CSS URL section.

If you just want to add custom CSS to a specific page, then add a Content Editor web part and point that to your CSS file.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top