[TYPO3-mvc] TypoScript manipulation per object property
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Thu Jul 22 01:29:28 CEST 2010
Thomas "Thasmo" Deinhamer wrote:
> I'd like to provide the possibility to define custom
> TypoScript for every property of every object available,
> which would be used to manipulate the final output of
> the property in the template.
Hey!
Just found out, that I ofc can use the cObject viewhelper to
get the desired effect/solution I want, but there are two things
which I don't like that much:
1) I have to explicitly set "current = 1":
stdWrap = TEXT
stdWrap {
current = 1
crop = 10 | ...
}
2) Adding a lot of those viewhelper will end in unreadable templates:
<span
class="street-address">{contact.street->f:cObject(typoscriptObjectPath:
'plugin.tx_hypedirectory.settings.view.contact.action.index.field.street.stdWrap')}</span>
(That's only for one property 'street' in the template.)
So I'm wondering if there would be a better solution which would
just apply the typoscript configuration and use the returned value
in the template.
Is it needed to "hook" into Fluid there somewhere?
I suppose it's cleaner to do this "manipulation" somewhere AFTER the
value was returned from the property getters, because I think it's
cleaner AND correct to return the full "raw" value from the getter.
(Also because I want to make this typoscript manipulation ONLY for the
template output.)
Any ideas?
Thanks a lot!
Thomas
More information about the TYPO3-project-typo3v4mvc
mailing list