Theme configuration

The different NatSkin styles (themes) are controlled using preference variables and can be set

Use the NatSkinStyleBrowser to preview the known styles and settings. Note, that the selection made there will only last for the current session. You need to add the respective preference variables to your home topic or the WebPreferences or the SitePreferences to make the selection persistent.

This is the list of variables to configure the skin style:

(url param)
Values Description Default
SKINSTYLE (style) base, jazzynote select a predefined style Clean
STYLEVARIATION (stylevariation) select a style variation none
STYLEBORDER (styleborder) on, off, thin change the border decoration; thin enables a blog-like page layout off
STYLEBUTTONS (stylebuttons) on, off switch on/of the tab buttons above the topic area off
STYLESIDEBAR (stylesidebar) left, right, both, off configure where the sidebar is to be displayed left

There are a couple of special url parameters:

Example: To emulate the Kubrick style on the old BinaryBonsai (not the new K2 style) use

  * Set SKINSTYLE = Kubrick
  * Set STYLEBORDER = thin
  * Set STYLESIDEBAR = right

There are some constraints build into the NatSkin templates that try guarantee a pleasant appearance when combining the different skin states:

Defining new Themes

The NatSkin can be themed using cascading styles attached to the System.NatSkin or any other topic defined in the STYLEPATH preference variable. This variable is a list of topics that are consulted for css attachments. The default value is

Styles are collected in the order specified. This allows to insert style contributions that are not part of the NatSkin. For example given you uploaded NatSkin css definitions to a topic Main.NatSkinThemesContrib you can activate them by setting the STYLEPATH to

  * Set STYLEPATH = Main.NatSkinThemesContrib, %SYSTEMWEB%.NatSkin

Css files must obey the following naming scheme to be recognized

Email Obfuscation

The standard Foswiki engine tries to obfuscate email addresses by adding a phrase to the email url (like NOSPAM) to fool collecting web crawlers. But that is not adequate enough today as crawlers are aware of that. The solution to that is to remove every trace of a pattern that could be an email address from the html source code and regenerate them using javascript. Most likely, web crawlers will only parse the html and don't run a javascript interpreter beforehand. Nevertheless the obfuscation feature can be switched on and off by adding the OBFUSCATEEMAIL variable to your DefaultPreferences or SitePreferences like


Misc preference variables

There is a set of variables that can be used influence how NatSkin behaves or renders pages.

NameSorted ascending Description
HTMLTITLE the <title>... of the html page; if no HTMLTITLE is defined the NatSkin will check for some formfields (Headlines, TopicDescription) to be used as a html page title and back off to the topic name
METAAUTHOR the value of this variable will be used to construct <meta name="author" ... /> in the html head
METADESCRIPTION the value of this variable will be used to construct <meta name="description" ... /> in the html head
METAKEYWORDS the value of this variable will be used to construct <meta name="keywords" ... /> in the html head
WHITEBOARD possible values: on, off; if WHITEBOARD is set to only the topic form will be edited when clicking on "Edit"; note, that the textarea is still accessible and not hidden completely; this is flag is only there for convenience

Hint: Assign default meta data per web by adding

  * Set DEFAULT_METAKEYWORDS = keyword1, keyword2, keyword3
to the WebPreferences and add extra keyword data per topic like this
  * Set METAKEYWORDS = %DEFAULT_METAKEYWORDS%, keyword4, keyword5, keyword6

Caution: don't add meta data to your home topic because it will override all other meta data preferences.

-- Foswiki:Main.MichaelDaum - 25 Aug 2006 spacer