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)

comment:1 Changed on 03/05/2015 at 04:02:09 PM by trev

  • Summary changed from [cms] to [cms] Allow defining custom functions in the website repository

comment:2 Changed on 03/25/2015 at 11:34:03 AM by trev

  • Resolution set to duplicate
  • Status changed from new to closed
  • Verified working unset

Heh, I created a duplicate under #2180 and resolved it already.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.