[TYPO3-dev] Re: [Typo3-dev] [TYPO3] Do you think too many wrap in typoscript template?
Dmitry Dulepov
typo3 at fm-world.ru
Wed Jan 4 09:43:49 CET 2006
Hi!
Dennis Cheung wrote:
> There are too many differenet warp in TS.
Old topic but I want to put example of using multiple wraps. Use case:
need to wrap thumbnail of the image with javascript that sets "main"
image to the source of the thumbnail. All this in TemplaVoila. Here it is:
===============================================
10 = IMAGE
10 {
file {
import = uploads/tx_templavoila/
import {
current = 1
listNum = 0
}
maxW = 66
}
}
10.stdWrap.innerWrap.field = field_spare_image
10.stdWrap.innerWrap.wrap =
<a class="product-spare-image"
href="javascript:setImage('product-full-image-main',
'uploads/tx_templavoila/|')
10.stdWrap.innerWrap2 = |</a>
===============================================
(example wrapped for better reading). Without multiple wraps I had to
make a COA and break <a> tag to two COA entries, which is not as elegant
as the above posted solution.
Dmitry.
More information about the TYPO3-dev
mailing list