[ckan-discuss] Customizing ckan - featured section

Aaron McGlinchy McGlinchyA at landcareresearch.co.nz
Wed Sep 18 22:32:59 BST 2013

Thanks Sean

Here's my plug for a simple way (e.g. via sysadmin config, or config file - specify an image and a link) to alter this to be incorporated into the base CKAN.  Seems a no brainer that if out of the box CKAN displays a featured section there should be an out of the box way to supply a basic setting for said feature.



Message: 2
Date: Tue, 17 Sep 2013 18:24:21 +0200
From: Sean Hammond <sean.hammond at okfn.org>
Subject: Re: [ckan-discuss] Customizing ckan - featured section
To: ckan-discuss at lists.okfn.org
Message-ID: <20130917162421.GB3165 at mistakenot>
Content-Type: text/plain; charset=us-ascii

> 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:


> 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.


Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz

More information about the ckan-discuss mailing list