[TYPO3-templavoila] FCE - Image with checkbox to select if 'click enlarge in lightbox' or not
Dmitry Dulepov [typo3]
dmitry at typo3.org
Thu Aug 30 12:47:45 CEST 2007
Hi!
Problem is more related to understanding how TypoScript works.
Ian Solo wrote:
> Now there's the problem. I tryed many ways to pass the value of the checkbox
> to the typoscript of the field_image at this point:
> --------------------------------
> 10.imageLightbox2 = <value of the checkbox>
> --------------------------------
For that imageLightbox2 must be of type stdWrap. But extension manual
says that it is simple boolean
(http://typo3.org/documentation/document-library/extension-manuals/kj_imagelightbox2/1.4.2/view/1/2/)
> but i can't find the way to pass it.
>
> I tryed:
> --------------------------------
> 10.imageLightbox2 = field_enlarge
This makes 10.imageLightbox2 equal to string "field_enlarge"
> --------------------------------
> 10.imageLightbox2.field = field_enlarge
This makes 10.imageLightbox2 an array with a member named "field", which
is equal to string "field_enlarge"
> --------------------------------
> 10.imageLightbox2.data = field:field_enlarge
> --------------------------------
Almost same as above
> 10.imageLightbox2 < field_enlarge
This makes 10.imageLightbox2 empty string because there is not TS object
named "field_enlarge"
> --------------------------------
> temp.enlarge = TEXT
> temp.enlarge.field = field_enlarge
> 10.imageLightbox2 < temp.enlarge
> --------------------------------
This creates the following:
10.imageLightbox2 = TEXT
10.imageLightbox2.field = field_enlarge
Remember, you do not copy ~result~ of TEXT object execution, you copy
the object itself!
> But none worked for me.
>
> Any tips please?
There are two ways:
- ask extension author to make this field "stdWrap". This is simple:
just one call to one function ($this->cObj->stdWrap) from extension.
Than you can use "data" or "field" as you tried above
- write more complex TS with "if"s that check value of the field and
output image correspondingly
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-project-templavoila
mailing list