[TYPO3-mvc] partial typoscript settings

Bastian Waidelich bastian at typo3.org
Fri Jul 16 12:04:50 CEST 2010


Daniel Dimitrov wrote:

Hi Daniel,

> In fluid partials there is no typoscript settings object
> {settings.someConfig} [...]
> Is this a bug or a feature?

Well, I wouldn't call it a feature, but it's not there by intention (:
partials are meant to be reusable Fluid snippets. You should be able to 
even use them from other extensions if you want to.
So they should not rely on some n nongeneric settings array but rather 
on some explicit options.
E.g. if you want to render your form text fields in a similar manner, 
you could have a partial like:

<dt{f:if(condition: required, then: ' class="required")}>
	{label}:
</dt>
<dd>
	<f:form.textbox property="{propertyName}" />
</dd>

And now you could render it

<f:render partial="form.myTextField" agruments="{label: 'First Name', 
propertyName: 'firstName', required: 'true'}" />

-> More to write, but less intransparent and error-prone.

HTH,
Bastian


More information about the TYPO3-project-typo3v4mvc mailing list