Forum OpenACS Q&A: Embedding CSS and JS files in xowiki pages

With reference to:

http://media.wu-wien.ac.at/download/xowiki-doc/

The docs mention embedding Style Sheets or Javascript code by using the following:

[[my-css.css]]

or

[[my-js.js]]

However on the latest version of Xowiki that I have installed this does not result in the code being added to the document HEAD.

To allow CSS files and JS files that are stored in the current wiki instance to be added to the document HEAD the following must be added to your xowiki object (e.g. an xowiki::Page or the template section of an ::xowiki::Form):

[[css:my-css.css]]

or

[[js:my-js.js]]

I would happily update the docs but don't have the ability to edit them.

Regards
Richard

Collapse
Posted by Gustaf Neumann on
exactly, the css: or js: prefix are needed. The reason for this change in new xowiki versions was that the older syntax did not allow to distinguish in the wiki syntax between a file-link and an include link.

a more actual version of the xowiki handbook is at http://alice.wu-wien.ac.at:8000/xowiki-doc/