[TYPO3-mvc] About limitations in Fluid
Sebastian Kurfürst
sebastian at typo3.org
Thu Apr 29 16:21:06 CEST 2010
Hey Lienhart,
cool that you want to use Fluid for LaTeX output :)
> I now see several possibilities to get this working:
> * Somehow escape the curly brackets in the template. This has several drawbacks: First, the template cannot be processed with the LaTeX compiler or an editor with syntax completion. Second, the readability of the template is reduced (ok, one can argue the readability of LaTeX code, but that's not the point here). Example \section\{foobar\}
> * Replace the brackets with a view helper like it is done in the kickstarter for html template templates. The previous drawbacks also apply here. Example: \section{pdf:curlyBracket(value: 'foobar')}
> * Use a different way of defining object accessors in Fluid. If one can configure the enclosing characters, a LaTeX template could access objects with something like \fvalue{some.crazy.object.assigned.to.the.view}. Then, curly brackets could be normally used in the LaTeX code. Example: \section{foobar}
> * Some proposal of you
>
> I actually prefer the third mentioned way, as it would allow adaption of Fluid syntax to the format at hand.
+1, I'd suggest this as well.
I'd propose to extend Tx_Fluid_Core_Parser_Configuration, to contain the
values for opening and closing object accessors.
Then, you could build a subclass of TemplateView, which changes the
configuration of the parser accordingly.
> By the way, some means to post process generated output would be really cool, for example to run the LaTeX compiler on the generated output.
> I haven't found a way to do this now other than subclassing the TemplateView.
I don't think that subclassing the TemplateView is a problem; it's a
valid and sometimes needed programming technique. Why not just subclass it?
Greets,
Sebastian
> netlogix GmbH & Co. KG
PS: Greets to Andi Förthner ;)
More information about the TYPO3-project-typo3v4mvc
mailing list