Allow each page to select its own CSS and theme

Until now each known user is allowed to choose the theme and CSS in the user preferences. It fits to the philosophy of moin to allow a user specific customization. This request asks fo a page specific customization addressing the anonymous user.

This easily could be managed with the following two lines:

Background: In our faculty we have a lot of little groups. Each of them is proud of its own (more ore less individual) corporate identity. Many of our groups would appreciate to migrate to one common wiki (one wiki, no wiki farm) -- if and only if they are the sovereign about the layout of their own pages.

Possible Solution: add custom pragmas

e.g.:

#pragma css http://example.com/css/group-a.css

Then add your custom theme that adds the custom css of the page to the head. You will have to override the method html_stylesheets in your theme, and insert the page css link before the user css link. Check FaviconTheme to learn how to get page pragmas in a theme.

You mean new processing instruction, not parser, there is nothing to parse here.

The theme can't use what the parser define for css link creation. The css links are created before the parser parse the text, or the parser parsed the text long time ago when the page was cached, and the value of the #css is not available.

The sane way to add this is pragma, which requires only a custom theme, possibly one method theme.


CategoryFeatureRequest

MoinMoin: FeatureRequests/ThemeCssPerPage (last edited 2007-10-29 19:06:05 by localhost)