[TYPO3-templavoila] additional field in FCE

Thomas Gabler Thomas.Gabler at gmx.de
Wed Jul 27 09:02:58 CEST 2011


there is a simpler method to accomplish the task;

I use the field layout instead of section_frame.

	noTrimWrap = | class="| csc-layout{field:layout}" |
	insertData = 1

Best regards,

> However, there is a way to accomplish what you wish without touching the DS. Use the "section frame" field of the CE field to set up your choices. If you do not need the default "Frame 1" entry then you could do something like this:
> TCEFORM.tt_content.section_frame.altLabels.20 = My Special Layout
> Then adjust the TS so that a div with your class is wrapped around the entire FCE. Look at the rendering for the default values of section_frame for guidance. If you are just adjusting the "20" value as in my previous example then it would be something like this:
> tt_content.stdWrap.innerWrap.cObject.20.15.value = csc-frame my-special-class
> This will give you a class on a div that surrounds the entire FCE which you can use to target the FCE. And the Framework code does not need to be touched and updates will not break it.
> Now this assumes that all you need is get a CSS class in there for adjusting styling but do not need to adjust the containerWidth register value that the framework uses to track the current width available. If you need to adjust that as well, then you will need to rewrite the rendering in the local processing of the template object. Or you can copy the DS as the basis of new custom FCE. But in ether case an understanding of how calculate and reset those container widths will be required.

More information about the TYPO3-project-templavoila mailing list