Opened 8 years ago

Closed 7 years ago

#5862 closed (wontfix)

Filters are not applied in an include tag

Reported by: gnuvince Owned by: nobody
Component: Template system Version: master
Severity: Keywords: tplrf-fixed
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

With the extends tag, you can do the following (trivial filter used for example purpose):

{% extends "foo/bar"|add_html_extension %}

And the filter will be applied to "foo/bar" before the call to extends. I figured this would work with the include tag as well, but it doesn't.

{% include "foo/bar"|add_html_extension %}

Here, the filter will never be called. Could we fix this?

Change History (3)

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 7 years ago by emulbreh

  • Keywords tplrf-fixed added

This would be fixed by the refactoring proposed in #7806.

comment:3 Changed 7 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed

No, this really isn't worth it. It's "programming in templates". Just pass in the right value to include (in a variable).

Note: See TracTickets for help on using tickets.
Back to Top