[TYPO3-dev] [Typo3-dev] [TYPO3] Do you think too many wrap in typoscript template?

Dennis Cheung hkdennis2k at gmail.com
Wed Jan 4 11:30:59 CET 2006


Thanks for you example.

Why not using stdWrap.typolink.dataWrap ?
I did installed TV so i can't do a test.

It is using one bug(I think) in typoscript's wrap.
it split text by | and join them.

If you do not have | in wrap, content will be appended. not skipped.
(btw, the innerWrap must escapeJS.)


If you had take a look in the php source.
You will found innerWrap2 is just another duplicate line after innerWrap.
And you will see many others wrap there. (even some didn't named wrap)

It is an "expensive cost" of maintance and update, keep their behaviour same.
Who will know these??

http://typo3.org/documentation/document-library/doc_core_tsref/stdWrap/
...If you want to study this further please refer to
tslib/content.php/, function stdWrap()...
There should be another way to do. User know how it works without
reading php source.

I still belive it is too much wrap, and missing one stdWrapArray.

Dennis.

On 1/4/06, Dmitry Dulepov <typo3 at fm-world.ru> wrote:
> 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.
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>




More information about the TYPO3-dev mailing list