简体   繁体   中英

CKAN - Customize Style in each Organization

I am using CKAN as an OpenData portal and I have an instance correctly running with its own Datasets, Groups and Organizations.

I was following the Theming Guide having got finally my own global site style configured. Despite of that my Organizations are very different between themselves and I would like to go further. How could I customize each Organization with their own style?

I am not sure if the only way is to write an extension (o rewrite Organization template) to add a "custom.css" file in the creation of an organization and load it each time is accessed. Is there any other way?

It sounds like you've changed the main CSS by setting config option ckan.main_css .

However you can't do much more visual customization without creating an extension, so I'd encourage you to do that. It's the first step in the Theming guide .

See also the CSS section of the Theming guide .

How you theme it depending on organization depends on the page you're targeting. But no doubt you could add some Jinja logic to load a different CSS file, or insert classes to CSS select on, depending on the organization.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM