[TYPO3-mvc] Tab widget

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jan 15 15:01:30 CET 2010


Hi,

> <f:widget.tabs>
>   <f:widget.tab>
>    <f:widget.label>Tab I</f:widget.label>
>    <f:widget.content>
>     Foo bar
>    </f:widget.content>
>   </f:widget.tab>
>   <f:widget.tab>
>    <f:widget.label>Tab II</f:widget.label>
>    <f:widget.content>
>     Lorem Ipsum
>    </f:widget.content>
>   </f:widget.tab>
> </f:widget.tabs>

I'm a big fan of semantically correct HTML, so for me the resulting HTML 
for a unobtrusive implementation of tabs should look something like this:
-------------------
<ul class="tabNavigation">
	<li #parameters#><a href="#idTabTarget1">Tabtitle</a></li>
	<li #parameters#><a href="#idTabTarget2">Tabtitle</a></li>
</ul>

<h2 id="idTabTarget1">Tab content headline</h2>
<p>Tab content</p>

<h2 id="idTabTarget2">Tab content headline</h2>
<p>Tab content</p>
-------------------

Question is, how this could also be generated configured by the widget? 
Also automatic looping over object arrays might be a request for a tab 
widget:

<f:widget.tabs each="{objects}" as="{object}" default="first" 
iterator="iterator">
   <f.widget.tab label="Topic: {iterator.count}" 
target="objectTabTarget{object.uid}">
     <h2 id="objectTabTarget{object.uid}">{object.title}</h2>
     <f:format.html>{object.description</f:format>
   </f:widget.tab>
</f:widget.tabs>


So maybe a mixture of the enhanced version of the "for" viewHelper (with 
iterator support etc.) combined with the tab widget features?

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list