[ckan-dev] How to access source XML document from harvested dataset?

Stefan Oderbolz stefan.oderbolz at liip.ch
Thu Dec 18 09:20:26 UTC 2014


Hi Bruce,

I don't think that's a good idea to have different data on the frontend and
the CKAN backend. This means that a user that uses the CKAN API to access
this data would not get the data, and in general it's so much easier to
display and style data in the "CKAN way" than having to hack around it.

But if you really really really want to do that, you have to write a custom
template helper function (
https://ckan.readthedocs.org/en/1485-rtd-theme/theming/templates.html#custom-template-helper-functions)
where you load in the XML and parse it to then have the information
available to display in the template.

- Stefan

On Thu, Dec 18, 2014 at 12:06 AM, Bruce Crevensten <becrevensten at alaska.edu>
wrote:
>
> We'd like to modify some dataset templates to display information that is
> present in the full XML of a harvested (ISO19139) document, but isn't
> pulled into CKAN fields via the harvester at the moment.
>
> How can that be accessed from a template?
>
> We know we can modify the harvester to pull in anything we want, but in
> this case the information (credits for people responsible for the dataset)
> may just pollute the CKAN metadata, so we thought perhaps we could just
> display it from the source XML document.
>
> Thank you,
> - Bruce
>
> --
> *Bruce Crevensten*
>
>
> *Senior Software Engineer*
> (SNAP) Scenarios Network for Alaska & Arctic Planning
> www.snap.uaf.edu
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>

-- 
Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141218/9b52dd3f/attachment-0003.html>


More information about the ckan-dev mailing list