Closed georgringer closed 2 weeks ago
Not 100% sure but I think this can be achieved with the (badly named) <f:cache.disable>
viewhelper:
wtf about the name
Yup. In any case this doesn't work:
<f:cache.disable><f:widget.paginate></f:widget.paginate></f:cache.disable>
This still throws the The ViewHelper "<f:widget.paginate>" could not be resolved.
error.
Side note: These cache.* ViewHelpers are really confusing and will probably be deprecated in the future.
As a first step making f:comment
like expected and described here would likely help. Evidently "disabling the compiler" also is not enough, since we'd actually need a "disable the parser" flag.
Yes. We're deep in the parser here.
The current "solution" is documented in f:comment: <f:comment><![CDATA[<f:some.invalid.syntax />]]></f:comment>
.
Wrap the content in CDATA works. Reason: The NamespaceDetectionTemplateProcessor removes any CDATA wrapped content in an early step, before everything else is fed to the parser.
CDATA is of course ugly and it requires this manual interaction.
I think fluid has currently no solution to "stop" parsing sub elements.
And it gets worse: ext:styleguide has this usecase: It has a code viewhelper that should output html. If that code contains fluid VH's, those are interpreted - similar to the f:comment scenario. The CDATA "solution" does not work here, since the entire content vanishes ...
What we would need is a registry of VH's, to tell the parser if a VH is used in a template, the template parsing should stop. It looks as if this requires to make the regex $SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS more dynamic, so fluid splits these parts differently on parser level. Such a change will require a bit of refactoring and a good solution for the registry. Not simple, and there may be more pressing issues.
Current ext:styleguide solution: html encode <
and >
and decode in VH again ...
Related: #808, #474, #346
There is also {parsing off}
to stop parsing an entire template, see #219 (does not help us here, but this is yet another approach)
This will be possible with Fluid v4, the change has just been merged.
this is a duplicate of https://forge.typo3.org/issues/97835 to have it in correct project