[TYPO3-50-general] Beer3 - Array Syntax and View Helpers

Franz Koch typo.removeformessage at fx-graefix.de
Thu Oct 30 10:22:01 CET 2008


Hi Sebastian,

>> as I already wrote you, I'd like to see a TS-object-rendering View 
>> Helper as a basis helper. Something like:
>>
>> <f3:tsobject configuration="TSpath.to.object" default="some value" 
>> additionaldata=dummyrecord />
> I think this is not part of the "f3"-Namespace, as it is nothing which 
> is "CMS-agnostic".

right - TypoScript is only typo3 related, so the f3-namespace really 
doesn't make sense. So it could be part of a typo3 view-Helper - 
something like "<t3:tsobject ..." as you already mentioned.

But I'm also not sure about the "tsobject", as abbreviations are not 
wanted as far as I know - but the full length is also a bit bothersome.

> However, I think especially for the 4.x branch it 
> makes sense to have such a tag (available as t3:tsobject for example).
> Do you think this separation makes sense?
> In 5.x, we'll have to see how the rendering will exactly work, and as I 
> do not have that yet fully in my head, I suggest we'll look at this when 
> we have some rendering in 5.x present!

yes right - let's first see how rendering in v5 will work. My thoughts 
are still trapped in the v4 world.


>> And there should be some Helper to render widgets or how ever that 
>> will be handled.
> I am not sure if it makes sense to have one generic tag for all widgets 
> - currently I'd moreover favor different tags for different widgets. For 
> the standard widgets, I think some namespace like "<widget:" makes 
> sense, as the widget implementation will be located in another package 
> presumably.
> 
> Benefits of different tags:
> - Autocompletion works
> - Each widget might have different arguments. By specifying them 
> one-by-one, we'll get stronger checking of arguments, which is handled 
> by the framework, and not the view helper itself.

I'm not sure if we really should have different tags for different 
widgets as it might be a bit confusing. What I could think of would be a 
generic widget wrapping tag and provide some configuration syntax or 
maybe a custom tag like suggested:

<widget:pager data=blog>
<!-- everything inside the widget tag is ignored by the template engine 
and handed over to the widget helper for further parsing -->
	<pager:numeric first-last="false" previous-next="true" limit="10" 
numbering="record-range" itemsperpage="10" itemstotal=posts.count() />
</widget:pager>

By writing this I noticed that it's really difficult and hard to read if 
you write every possible configuration option inside one tag. In case of 
the example pager there would be so much more options. Of course - 
widgets are most likely preconfigured - but it still has to be possible 
to override every option from inside the template.

> I think the first step would be to implement the templating, and then 
> think further how we'll really build the widget system.
> 
> Does this sound reasonable to you?

yep - is reasonable :)

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-5_0-general mailing list