Add css-class to wiki page

Added by Stefan Lindner 5 months ago

A wiki page is rendered as

<div class="wiki wiki-page">
  <p.../>
</div>

Is there any trick to add a custom css class to the div to have something like this:

<div class="wiki wiki-page my-custom-css">
  <p.../>
</div>

We have a sort of wiki pages with a special layout. So it would be very helpful to group the whole content of the page into a blco with a special css class.

Surrounding the wohle wiki content with a html <div> would also do the trick but this is not possible in standard textile wiki.

Any idea how to do this?

We use redmine 3 and plan to move to redmine 4. So if there is a solutiion in redmine4 this would solve our needs.

Replies (1)

RE: Add css-class to wiki page - Added by Bernhard Rohloff 5 months ago

I think I would install custom macros and stylesheets within a plugin.
Depending on how you would like to style your page you can either define single modules or wrap your whole content within an opening and closing div tag.

This would look kinda like this:

Normal content...

{{ custom_module_xyz }}

Another normal content...

{{ custom_module_abc( "with text" ) }}

Rest of content...

or this...

{{custom_style_open}}

Your wrapped content...

{{custom_style_close}}

(1-1/1)