Difference between revisions of "Reference:BlueSpiceNamespaceCSS"

m (Hint)

Use different CSS styles for different namespaces. This can be very useful to e.g. distinguish between different manuals or parts of your wiki.

Technical background[edit | edit source]

Whenever calling up a page in a namespace, the extension NamespaceCss sees if you have defined a "CSS-page" for this namespace in the MediaWiki namespace. If so, this will then be used as stylesheet.

How does NamespaceCss work?[edit | edit source]

For each namespace you want to define your own CSS for, you have to create a page in the MediaWiki namespace, using the following template:


MediaWiki:NamespaceName_css


You can now enter your desired CSS-code directly into this page.
Example: MediaWiki:User_css affects all pages in the namespace User.


Please note: The Special namespace is an exception, as you cannot define a separate CSS for it.

Hint[edit | edit source]

Make sure that the following code is part of every MediaWiki:NamespaceName_css page to ensure that the CSS registers properly. Otherwise the VisualEditor might discard your notations:

 /*
 __NOEDITOR__
 */



Use different CSS styles for different namespaces. This can be very useful to e.g. distinguish between different manuals or parts of your wiki.
        
        
        
        ==Technical background==
        
        Whenever calling up a page in a namespace, the extension '''NamespaceCss''' sees if you have defined a "CSS-page" for this namespace in the ''MediaWiki'' namespace. If so, this will then be used as stylesheet.
        
        
        
        ==How does NamespaceCss work?==
        
        For each namespace you want to define your own CSS for, you have to create a page in the MediaWiki namespace, using the following template:<br/>
        
        
        
        
        
        
        <center><code><nowiki>MediaWiki:NamespaceName_css</nowiki></code></center>
        
        
        
            
            
        <br/>
        
        You can now enter your desired CSS-code directly into this page.<br/>
        
        Example: <code>MediaWiki:User_css</code> affects all pages in the namespace ''User''.
        
        
        
        
        
        '''Please note:''' The ''Special'' namespace is an exception, as you cannot define a separate CSS for it.
        
        
        
        ===Hint===
        
        Make sure that the following code is part of every <code>MediaWiki:NamespaceName_css</code> page to ensure that the CSS registers properly. Otherwise the [[VisualEditor]] might discard your notations:
        
        
        
        
        <pre> /*
        
         <nowiki>__NOEDITOR__</nowiki>
        
         */
        
        
        </pre>
        
        
        
        
        <br /><br />
        
        {{Box_Links-en | Thema1 =[[Namespace|Namespaces]] | Thema2 =[[Namespacemanager|Namespace Manager]] | Thema3 =[[PageTemplates|Page Templates]] | Thema4 = }}
        
        
        
        [[Category:BlueSpice_free]]
        
        [[Category:Extension]]
        
        [[Category:BlueSpice_docu]]
        
        [[Category:BlueSpice_public]]
            
            [[en:{{FULLPAGENAME}}]][[de:NamespaceCss]]
Line 5: Line 5:
  
 
==How does NamespaceCss work?==
 
==How does NamespaceCss work?==
For each namespace you want to define your own CSS for, you have to create a page in the MediaWiki namespace, using the following template:<br/>
+
For each namespace you want to define your own CSS for, you have to create a page in the MediaWiki namespace, using the following template:
  
  
 
<center><code><nowiki>MediaWiki:NamespaceName_css</nowiki></code></center>
 
<center><code><nowiki>MediaWiki:NamespaceName_css</nowiki></code></center>
 +
 
<br/>
 
<br/>
 
You can now enter your desired CSS-code directly into this page.<br/>
 
You can now enter your desired CSS-code directly into this page.<br/>
Line 31: Line 32:
 
[[Category:BlueSpice_docu]]
 
[[Category:BlueSpice_docu]]
 
[[Category:BlueSpice_public]]
 
[[Category:BlueSpice_public]]
 +
[[en:{{FULLPAGENAME}}]][[de:NamespaceCss]]

Attachments

Discussions