[TYPO3-templavoila] Two fieldnames wrap TV/FCE

Dmitry Dulepov 9f4eetb02 at sneakemail.com
Thu Apr 12 11:28:33 CEST 2007


Hi!

Michiel Zoer wrote:
> I have a simple problem (for the advanced Typo3 gurus).
> 
> Within my TV (FCE) datastructure I map the 'style=' attribute of a <DIV 
> style=""> container with the following TS:
> (where field_container is een colorpicker color-value). So good so far. 
> The DIV is rendered correctly <DIV 
> style="background-color:#cccccc;">...</DIV>
> 
>     <TypoScript>
>    renderObj = COA
>    renderObj {
>      10 = TEXT
>      10.field = field_containerColor
>      10.wrap = background-color:|;
>      }
>     </TypoScript>
> 
> How can I add a second style property like 'color=' like what I'm trying 
> below (which doesn't work).
> <DIV style="background-color:#cccccc; color:#ffffff;">..</DIV>
> 
> Thanks!
> 
>     <TypoScript>
>    renderObj = COA
>    renderObj {
>      10 = TEXT
>      10.field = field_containerColor
>      10.wrap = background-color:|;
>      20 = TEXT
>      20.field = field_containerColor
>      20.wrap = color:|;
>      }
>     </TypoScript>

Easy. Make second field (field_containerColor2) of type NOMAP. Then do this:

<TypoScript>
    renderObj = COA
    renderObj {
      10 = TEXT
      10.field = field_containerColor
      10.wrap = background-color:|;
      20 = TEXT
      20.field = field_containerColor2
      20.wrap = color:|;
      }
</TypoScript>

This way you still can fill value for second color. It will not be 
mapped to any attribute but its value will be inserted as a part of 
first field.

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)


More information about the TYPO3-project-templavoila mailing list