Swank Wiki
Recently Visited

Swank v0.04.04

Skinning your Wiki


General layout is done with a layout page, which can be edited in the wiki. (amazing, no?)

Page editing features (where the action buttons appear, etc) are done by the /site.xml page.  It is automatically wrapped around every page on the wiki.  It is possible to edit this from within the wiki, but is rather confusing to do because there is a type of chicken-and-egg effect when it trys to display itself.  It calls several helpers, such as action.xml.

Also, /site.swank_wrap defines the name of the layout page.


Appearances can be skinned with css, which is very dependant on the layout file above.  The css files are currently best handled as attachments to pages.

The css file stored at /site/attach/site.css is an important one.  It defines several site-wide things, and is needed to make the text look correct inside the tiny-mce editor.  I have tried to keep this to the bare minimum needed for every site.

/site/attach/print.css should remove layout stuff, so we just get the main page content when printing.  These two are both inserted into the html header by the main /site page.

The contents of the html_head field on the requested page (and any wrapping pages) are inserted into the html <head> tag.  (Other pages can put stuff in the <head> tag with the $io->html_head function.)  This is a good place to put the <link> tag for the local site's css file, which could even be an attachment to the layout page. 

If a site wants to support multiple skins which can be selected by the user, the /site.swank_wrap could be used to select the correct layout (needs testing).  If changes only involve css files, /layout.html_head can choose the needed css file.