Opened 3 years ago

Closed 3 years ago

#5044 closed change (fixed)

Allow to use templates that are not located within sitescripts root directory

Reported by: kvas Assignee: kvas
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



#4377 created new form handler that has a configurable list of fields and configurable email template. However, because of the way templates are loaded, it's not possible to specify a template location outside of sitescripts root. Placing the configured template inside sitescripts is rather suboptimal because it might be automatically overwritten. It also violates the principle that configuration should be located separately from the code.

What to change

Allow specifying template location outside of sitescripts root in <name>.template variable in [formmail2] section. Relative paths should be resolved relative to sitescripts root for backwards compatibility but absolute paths should be resolved from filesystem root.

Change History (5)

comment:1 Changed 3 years ago by kvas

  • Priority changed from P3 to Unknown
  • Ready unset

comment:2 Changed 3 years ago by kvas

  • Owner set to kvas
  • Priority changed from Unknown to P3
  • Ready set

comment:3 Changed 3 years ago by kvas

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 3 years ago by abpbot

A commit referencing this issue has landed:
Issue 5044 - Support absolute paths for Jinja templates

comment:5 Changed 3 years ago by kvas

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.