Opened on 03/05/2015 at 04:01:48 PM
Closed on 03/25/2015 at 11:34:03 AM
#2091 closed change (duplicate)
[cms] Allow defining custom functions in the website repository
Reported by: | trev | Assignee: | |
---|---|---|---|
Priority: | P4 | Milestone: | |
Module: | Sitescripts | Keywords: | goodfirstbug |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown | |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description
Background
Our CMS currently allows defining custom Jinja2 template filters in the repository. However, sometimes we simply need to call a function and get a result back rather than transform some data. While we are currently misusing filters for this, a cleaner approach would help.
What to change
Implement a way to define Jinja2 template functions similarly to how filters work right now. These functions can be hooked up to the Jinja2 environment as globals.
Attachments (0)
Change History (2)
Note: See
TracTickets for help on using
tickets.
Heh, I created a duplicate under #2180 and resolved it already.