Martin Glauer
Martin Glauer

Reputation: 101

Template tags in CKAN 2.4

I am currently writing a CKAN extension. Now I need some custom tags in my HTML templates as they are present in Django. The CKAN documentation is not exactly verbose on this topic. Does anybody know whether I can add custom tags in CKAN?

Upvotes: 0

Views: 67

Answers (1)

D Read
D Read

Reputation: 3224

The code that loads jinja and adds ckan's own custom tags is here:

https://github.com/ckan/ckan/blob/0b7aa77e5e38d1376050b638d19a88da67346ea6/ckan/config/environment.py#L216-L227

Check out the jinja docs to see if you can add to it once its created, which you could do from an extension. Otherwise, create a new plugin point and submit it as a PR.

Upvotes: 1

Related Questions