Code

Opened 6 years ago

Closed 6 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?

Attachments (0)

Change History (3)

comment:1 Changed 6 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 6 years ago by emulbreh

  • Keywords tplrf-fixed added

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

comment:3 Changed 6 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).

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.