[ckan-discuss] Customizing ckan - featured section

Sean Hammond sean.hammond at okfn.org
Tue Sep 17 17:24:21 BST 2013


> Related question, how do you specify the section to be featured on the
> home page. I've searched the documentation for featured section and it
> doesn't bring up anything relevant.

I think you have to write your own CKAN theme and override the relevant
template block, there's no quicker way (e.g. config file option) as far
as I know. You might find the new theming docs (in progress) useful:

http://docs.ckan.org/en/847-new-theming-docs/theming.html

> Hi! I am customizing my ckan. Where it appears "This is a featured
> section", I would like to show a image. I wrote in the
> development.ini:
> 
> ckan.template_footer_end = <style type="text/css">
> 
>     .media-image a { background-image : url("base/images/photo.jpg");}
> 
>   </style>
> 
> but it doesn't appear any image. How can I fix it?

This won't work, the featured image is not a CSS background-image (at
least not on the master version of CKAN I'm running), it's an actual
HTML <img> tag, so you'll have to follow the template overriding
approach I described above.



More information about the ckan-discuss mailing list