Smallwiki and importing Stylesheets

Lukas Renggli renggli at iam.unibe.ch
Tue Aug 31 18:16:02 MEST 2004



Hi Hans,

> one small problem: I want to set a style sheet file in the directory 
> where squeak runs (the image is). But obviously I can not give a 
> relative path for importing a stylesheet (like @import 
> ./mystylesheet.css";)
> The problem is, in the squeak port of SmallWiki it doesn't work to use 
> a SWResource (which should work according to FAQ).

I don't know about the squeak port, but I thought this problem was 
fixed a long time ago.

> Any other possibilities to get it work ?

There are several possibilities that come into my mind:

- put the css onto a different web-server and import it with the full 
path

- use Apache as a proxy to SmallWiki and add a rewrite rule to serve 
the css from Apache itself

- write an action that simply returns your css

	MyStylesheetAction>>execute
		html nextPutAll: '*your-stylesheet*'

   and include it using

	@import "./?action= MyStylesheetAction"

- use the following

On Dec 15, 2003, at 14:44, Hannes Hirzel wrote:
> Thank you that you will look into this. From my perception the bug is 
> in the method I mentioned above. For the wiki I set up I use the 
> following a crude workaround
>
> 1) in SWResourceEdit>>#data:mime
>
> I comment out the setting of the mime type
>
> (it would set it to nil which I don't want)
>
> 2) in SWResourceEdit>>renderFields
> I add
>
> html tableData: [html textInputWithValue: self mime callback: #mime: ]]
>
> So I have the user to input the mime type manually in a text field.
>
> For the moment I think this is fine. I was not able to find the bug
> and to fix it along the lines of the original design.

- or even better: write a fix for the SWResource bug ;)

Hope this helps,
Lukas

-- 
Lukas Renggli
http://renggli.freezope.org




More information about the SmallWiki mailing list