Opened 5 years ago

Closed 5 years ago

#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.

Change History (2)

comment:1 Changed 5 years ago by trev

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

comment:2 Changed 5 years ago 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.

Note: See TracTickets for help on using tickets.