> HelpOnConfiguration/CascadingStyleSheets

The following 169 words could not be found in the dictionary of 159 words (including 159 LocalSpellingWords) and are highlighted below:

above   accessing   add   alias   all   allow   Allowing   alternate   an   and   another   any   Any   Apache   apply   are   Arial   as   assumes   attributes   automatically   available   background   basics   be   below   between   bit   body   But   button   by   called   can   change   changes   Changing   choices   choose   Choose   clicking   color   config   contents   correct   create   created   css   D7   default   Default   directory   E7   edit   editor   erasing   example   except   explicitly   family   field   file   Finally   first   followed   following   font   for   function   Get   good   green   have   Help   Helvetica   holding   htdocs   if   If   import   in   In   including   incorporated   initializes   installation   instruct   instructions   it   later   line   logos   modify   modifying   Modifying   moinmoin   mywiki   need   new   newer   Next   Note   now   of   On   on   only   option   or   original   outdated   override   Override   page   pointing   practice   preferences   Preferences   probably   py   return   save   Save   select   several   share   Sheet   sheet   Sheets   sheets   shown   specified   still   style   Style   Test   text   Text   The   the   their   themes   Then   this   those   to   To   updates   upgrade   use   User   user   Users   users   Using   value   verifying   version   we   When   who   wiki   wikidata   will   wish   with   wording   you   your  

Clear message

Modifying the MoinMoin Default Style Sheets

/!\ In 1.2, this is a bit outdated, as we have themes now. But the basics still apply...

If you wish to modify the default MoinMoin style sheet, it is a good practice to create a new .css file and use the @import function to import the original moinmoin.css file. Override only those attributes you wish to change. Then, if you later upgrade to a newer version of MoinMoin, any changes to the original moinmoin.css file will be incorporated automatically.

The following example assumes you have followed the installation instructions and created an Apache or IIS alias called wiki pointing to ~/share/moin/htdocs and another alias called wikidata pointing to ~/Moin/wikidata for holding your logos and style sheets.

To override the default body background color and font, use your text editor to create a file called mywiki.css with the contents shown below and save it in the directory ~/Moin/wikidata.

@import url("/wiki/css/moinmoin.css");

body {
    background-color: #FAEBD7;  
    font-family: Arial,Helvetica;  
}

Next, edit ~/Moin/mywiki/moin_config.py and modify (or add) the following line:

css_url = '/wikidata/mywiki.css' 

Test by accessing any wiki page and verifying your changes are correct.

Allowing Users to Choose a Style Sheet

To allow you users to choose between alternate style sheets, you first need to create several choices. Using the example above, change the background-color to #E7FFE7 and save the file as green.css in ~/Moin/wikidata/.

Test this option by modifying your user preferences to select a CSS URL of /wikidata/green.css.

Finally, you will probably need to edit HelpOnUserPreferences and change the wording for CSS URL to instruct your users on the choices available, including the new option for a green background.

Note: When a user initializes or updates their UserPreferences, the default value for CSS URL will be the value specified in ~/Moin/mywiki/moin_config.py. Changing the value in moin_config.py changes the value for all users, except for those who have explicitly specified an alternate css file. Any user can return to the default value by erasing the CSS URL field value and clicking the Save button.