[ckan-dev] Image in featured section (Re: Creating 4 featured groups on the index page instead of 2.)
Ralf Krüdewagen
user66 at arcor.de
Fri Jun 14 06:02:58 UTC 2013
Hi Sean,
thank you very much for your support and efforts improving CKAN.
There is no doubt that CKAN is a great piece of software. Things need time, yes.
@Mireille
I have already changed the featured section (the image) on the start page by using "extra_template_paths", which is unfortunately marked as "legacy" and "don't use it any more" in the docs (however, for extensions it's still recommended in the docs) , but is IMHO the simplest way to change existing pages.
Just set it to something like
extra_template_paths = /usr/lib/ckan/demo/src/ckan/my-templates
Note: Maybe use a dir outside "src/ckan" to avoid Git conflicts.
Then copy template files for pages you want to change from "src/ckan/ckan/templates" to this dir.
Example content in my "extra_template_paths":
$ ~/demo/src/ckan/my-templates$ find .
.
./package
./package/snippets
./package/snippets/disqus.html
./package/read.html
./home
./home/index.html
./home/snippets
./home/snippets/disqus.html
./home/about.html
The image is set in "my-templates/home/index.html". The other templates are used to add ckanext-disqus comments functionality.
The result can be visited here: http://demo.offene-daten.me
Cheers
Ralf
----------------ursprüngliche Nachricht-----------------
Von: "Sean Hammond" sean.hammond at okfn.org
An: ckan-dev at lists.okfn.org
Datum: Fri, 14 Jun 2013 00:13:26 +0200
-------------------------------------------------
>> Otherwise, agree - it is a lot of work to change this - i am on the hunt
>> how to change the "this is a featured section" + image on the homepage as
>> well.
>
> It looks like "This is a featured section" and the image haveto be
> changed by using a custom template file to override that part of the
> front page template.
>
> Unfortunately as mentioned there isn't a nice, step-by-step tutorial for
> theming/templating CKAN yet, although I'd like to write one when there's
> time. The relevant existing docs are here:
>
> http://docs.ckan.org/en/latest/theming.html
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
More information about the ckan-dev
mailing list