[TYPO3-templavoila] Good practices: variants of the same HTML layout, what's your opinion?

Riccardo De Contardi riccardo.decontardi at bhuman.it
Fri Apr 2 12:05:20 CEST 2010


Hello,

I think another good way could be be:

Leave in your HTML template:

<div class="myHeaderClass">
	...all your stuff...
</div>

Then, map here an ATTRIBUTE element in TV, choosing "class" as attribute  
and type="select" (or selector box, I don't remember exactly the name).
Last, edit your DS and add the values you need:

<items type="array">
   <numIndex index="0" type="array">
     <numIndex index="0">Background 1</numIndex>
     <numIndex index="1">myHeaderClass</numIndex>
   </numIndex>


   <numIndex index="1" type="array">
     <numIndex index="0">Background 2</numIndex>
     <numIndex index="1">myHeaderClass2</numIndex>
   </numIndex>



and so forth.

Regards,





-- 
--------------------------------------------
Riccardo De Contardi - Web Developer
B Human Srl - www.bhuman.it
Via Canzio, 15 - 20131 Milano
TEL +39-02-20.23.271 - FAX +39-02-20.240.561
--------------------------------------------


More information about the TYPO3-project-templavoila mailing list