[ckan-dev] How to add a new page based on page.html (similar to /groups or /dataset)
Nigel Babu
nigel.babu at okfn.org
Wed Oct 16 03:36:06 UTC 2013
Hi Jesús,
You need to create a controller inside your plugin and have new routes
point to functions in that controller. The templates they point to should
inherit from page.html, so you'd get the right styling. I've added a few
pages in the ckanext-edo[1] extension. You should be able to take a look at
it and get an idea of how to add a new page.
Let us know if you're still not sure.
[1] https://github.com/okfn/ckanext-edo/blob/master/ckanext/edo/plugin.py
Nigel Babu
Developer | @nigelbabu <https://twitter.com/nigelbabu>
The Open Knowledge Foundation <http://okfn.org/>
Empowering through Open Knowledge
http://okfn.org/ | @okfn <http://twitter.com/OKFN> | OKF on
Facebook<https://www.facebook.com/OKFNetwork> |
Blog <http://blog.okfn.org/> | Newsletter<http://okfn.org/about/newsletter>
CKAN | http://ckan.org/ | @CKANproject
<http://twitter.com/CKANproject> |the world’s leading open-source data
portal platform
On 16 October 2013 04:36, Jesús Redondo <redondogarciajesus at gmail.com>wrote:
> Hello, I have installed and configured one CKAN 2.0.1 instance.
>
> You can check it out here: http://www.caceresabierto.es; as you can see
> it is still very basic.
>
> My problem is the following, I want to create the page
> http://www.caceresabierto.es/aplicaciones. I understand that there should
> be a method to heritage the layout and the basic theming from the main
> template (if I am not wrong is "base.html" or "page.html" in the
> 'templates' folder).
>
> The point is: I have figured out how to modify www.caceresabierto.es/*
> dataset* or www.caceresabierto.es/*groups*. But I don't know how to add a
> new route like www.caceresabierto.es/*aplicaciones* that heritage from
> "page.html".
>
> I suppose I will need to create a new HTML file in the 'template' folder
> and maybe modify setup.py or plugins.py...But I need some help to do it.
>
> Any feedback would be great. Thank you.
>
> Jesús Redondo.
> ------------------------------
>
> Apologies for cross-posting.
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20131016/6d4d1ee7/attachment-0001.html>
More information about the ckan-dev
mailing list