Suggestion #36771
Implementation of Fluid Template-Engine
| Status: | Resolved | Start date: | 2012-05-02 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Reinhard Führicht | % Done: | 100% |
|
| Category: | - | |||
| Target version: | v1.4 | |||
| Votes: | 2 (View) |
Description
I think the fluid engine has much more capability vs. the classic marker templating.
The Extension "formhandler_fluid" seems to be a very alpha-state "try" to implement this.
I think it would be much better to have a direct implementation in formhandler to make and keep this feature "stable". Maybe by making the classic marker and the fluid-templating each as a separate user-selectable module.
Associated revisions
Allow "templateFile" to be a cObject. Allows to write your template code directly in TypoScript (resolves #36771)
Allow "templateFile" to be a cObject. Allows to write your template code directly in TypoScript (resolves #36771)
History
Updated by Grégory Duchesnes 11 months ago
I definitely agree,
a simple first step could be allow the use of a cObj as templateCode so that one can use the FLUIDTEMPLATE cObj.
example :
plugin.Tx_Formhandler.settings {
// templateFile = fileadmin/templates/form.html
templateFile = FLUIDTEMPLATE
templateFile {
file = fileadmin/templates/form.html
partialRootPath = fileadmin/templates/Fluid/
layoutRootPath = fileadmin/templates/Fluid/
}
}
all it takes is to add a call to Tx_Formhandler_UtilityFuncs->getSingle() in Tx_Formhandler_UtilityFuncs->readTemplateFile() in case templateFile is a Cobj.
Updated by Reinhard Führicht 11 months ago
- File 36771.patch added
- Status changed from New to Needs Feedback
- Assignee set to Reinhard Führicht
- Target version set to v1.4
It is not that easy to either integrate FLUId to Formhandler or to keep it stable and to maintain it.
I only had a quick look into FLUID a while ago and since Formhandler doesn't use any objects internally, I don't see any real advantage besides being able to use you own ViewHelpers. But my knowledge about FLUID isn't the best, so I would be happy to be enlightened. :-)
I made a quick patch to make it possible to use a cObject for the setting "templateFile" returning HTML content. If this is sufficient for you, then I will just commit it.
Updated by Grégory Duchesnes 11 months ago
I can not speak for Gabriel but your patch is fine for me
Updated by Gabriel Kaufmann / Typoworx NewMedia 11 months ago
Hello Reinhard,
thanks for the feedback. I think your patch should do it as first draft in the right way. Well I also see the conflict between non-object markers and object-based templating (=Fluid Templating).
You should get into contact with the maintainer of this project:
http://forge.typo3.org/projects/show/extension-formhandler_fluid
He tried to implement Fluid-Templating for Formhandler some time ago. I dropped trying it as there seemed to be something broken (some hook or something) for newer versions of Formhandler. So I'm also not very used into using Fluid - but regarding the docs for Fluid-Templating it would be a great benefit for Formhandler.
@ Grégory Duchesnes
Do you have some experience how we could easily migrate Fluid for Formhandler?
Updated by Reinhard Führicht 9 months ago
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
Applied in changeset r65721.