[TYPO3] allWrap media field

Bas van der Togt bas.vander.togt at efocus.nl
Mon Nov 19 17:00:30 CET 2007


Hello list,

I just noticed that my javascript gives an error with this TS.
How can i change the wrap for the last item? I tried to do it with 
optionsplit but that's only working with HMENU.

This is what i get now: 'pic1.jpg', 'pic2.jpg', 'pic3.jpg',
This is what i want: 'pic1.jpg', 'pic2.jpg', 'pic3.jpg'
So without the last ,

My TS:
obj.header = TEXT
obj.header {
	field = tx_profslideshow_images
	split {
		token = ,
		wrap = '|',
	}
	wrap (
   	<script type="text/javascript">
		window.onload = function() {
			myShow = new Slideshow('slideshow', { type: 'fade', duration: [2000, 
4000], width: 500, height: 227, images: [|], hu: 
'uploads/tx_profslideshow/' });
   		}
	</script>
	)
}

kind regards,
Bas

Bas van der Togt wrote:
> I found it:
> 
> obj.header = TEXT
> obj.header.data = levelmedia: -1, slide
> obj.header.split {
>     token = ,
>     wrap = '|',
> }
> obj.header.wrap (
>     <script type="text/javascript">
>     window.onload = function() {
>         myShow = new Slideshow('slideshow', { type: 'fade', duration: 
> [2000, 4000], width: 500, height: 227, images: [|], hu: 'uploads/media/' 
> });
>     }
>       </script>
> )
> 
> cheers,
> Bas
> 
> Bas van der Togt schreef:
>> Thank you for your answer Francois!
>>
>> But this script is not working.
>> It's repeating the javascript without any files from the mediafield.
>> Any iedea?
>>
>> kind regards,
>> Bas
>>
>> Francois Suter schreef:
>>> Hi again,
>>>
>>> I think I did a small error in my script. I think it should rather be:
>>>
>>> obj.header = TEXT
>>> obj.header {
>>>     data = levelmedia : -1 , slide
>>>     split {
>>>         token = ,
>>>         cObjNum = 1
>>>         1 {
>>>             10 = TEXT
>>>             10 {
>>>                 value.current = 1
>>>                 wrap (
>>>                     <script type="text/javascript">
>>>                         window.onload = function() {
>>>                             myShow = new Slideshow('slideshow', { 
>>> type: 'fade', duration: [2000,4000], width: 500, height: 227, images: 
>>> [|], hu: 'uploads/media/' });
>>>                         }
>>>                        </script>
>>>                 )
>>>             }
>>>         }
>>>     }
>>> }
>>>
>>> Not tested, but it should put you on the right track anyway. 
>>> Hopefully :-)
>>>
>>> Cheers


More information about the TYPO3-english mailing list