Feature #5257
Allow generic post-processing of template content
Status: | Resolved | Start date: | 2009-11-06 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Core | |||
Target version: | - | |||
Has patch: |
Description
Currently relative URLs to resources must be created using the resource viewhelper. It would be a lot nicer if that was not needed, and this triggered the idea of post processing values.
For the task at hand it would be sufficient to add the needed code to evaluate()
in TextNode
, but that would not be compatible with Fluid for v4 and it seems to be better to come up with a more generic solution.
- classes implementing a certain interface can be registered with Fluid
- each class can be registered to act on only certain types of syntax tree nodes
- after a template is parsed those processors are asked to do their work on the matching nodes
That would allow to plug in a processor to adjust resource URLs as well as apply HTML escaping on all text nodes (see #5256)
Related issues
Associated revisions
[+FEATURE] Fluid: Merged the changes from the parsing-interceptors branch to trunk. Now one can register interceptors with the Fluid parser to influence the parse tree building. This comes with a replacement HtmlSpecialCharsPostProcessor and adds transparent handling of resources referenced from templates. Resolves #5257.
History
#1 Updated by Karsten Dambekalns over 5 years ago
See r3475 for the start of this and feel free to try it out...
#2 Updated by Karsten Dambekalns over 5 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r3751.