[Moin-user] (ab)Using Admonitions to implement sidebar

Mail@Heavy.ch mail at heavy.ch
Mon Mar 23 17:20:27 EDT 2009


Frank Lin PIAT schrieb:
> Hello,
> 
> It seems that it is be possible to implement a sidebar using the
> Admonition logic.
> You can see an example in [1]. The typical wiki code and CSS are below.
> 
> What do you think about it?
> I could work on a patch if you are interested.
> 
> Franklin
> 
> 
> ### SAMPLE CODE ###
> {{{#!wiki sidebar
> '''New call for test'''
>  Test1 :: Foo
>  Test2 :: Bar.
> }}}
> ####
> 

this is not specially a "admonitions" stuff, you just can use a html or
wiki parser and add to the div tag some classes and then give those
div's a style with css. I also use css like left, right, fancy, etcetera
and then you can write "{{{#!wiki sidebar right fancy".

btw. this adding css classes also works for embedded / included
attachment (like images) {{attachment:images.png|alt text|class=photo left}}

I think - if you want to have the same sidebar content on many pages,
then it is, in my eyes, better to use some theme based sidebar stuff,
like the gugiel theme is using: http:/moinmo.in/ThemeMarket/Gugiel). the
benefit is also that you just need to set a #pragma and have single page
for the sidebar stuff. it's also even possible to define a default for
all pages.

Also to know... don't forget to make some print css and maybe take a
look how the pages looks without css (so you be sure that you still have
some useful structure in your wiki page. Be also aware that this stuff
maybe not working together with docbook exporting.

soo enough, hope it helps a bit
bye
Marcel






More information about the Moin-user mailing list