> HelpOnConfiguration/CascadingStyleSheets

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

above   accessing   add   allow   Allowing   alternate   another   any   Any   Apache   Arial   assumes   attributes   automatically   available   be   below   between   button   called   change   changes   Changing   choices   choose   Choose   clicking   color   contents   correct   created   css   D7   E7   erasing   except   explicitly   family   Finally   first   followed   following   function   Get   green   Helvetica   holding   htdocs   if   import   including   incorporated   initializes   installation   instruct   instructions   later   line   logos   modify   Modifying   modifying   moinmoin   mywiki   need   new   newer   Next   option   or   original   override   Override   pointing   practice   preferences   probably   py   save   Save   select   several   Sheet   sheet   Sheets   sheets   shown   specified   Then   this   updates   upgrade   url   Users   users   Using   value   verifying   version   When   wikidata   will   wish   wording   you   your  

Clear message

1. Modifying the MoinMoin Default Style Sheets

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.

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