[TYPO3] typoscript HMENU/TMENU create js image array (all pages)

Gijs Epping gijs.epping at efocus.nl
Mon Oct 22 09:34:32 CEST 2007


Hello,

I want to create a lightbox implementation with slimbox, but instead of 
all the other "lightbox" implementations that are using image gallery's 
to start a lightbox i need to start a lightbox with multiple images from 
a link.


I was trying to create a javascript array by running trought the whole 
page structure with HMENU/TMENU and the use the page id and menu name as 
id's.

BUT, there are multiple image in the media field of a page that should 
be displayed in the lightbox. And i don't know how to get that piece of 
code in my typoscript.

Hope somebody can assist me with this.

The final js code should look something like this, And Below that, my 
typoscript, (the if else with the lighbox switch is necesarry). And it 
is missing the whole image part.


<script>
slimboxArray[]['page_12']='/upload/image/image_01.jpg'
slimboxArray[]['page_12']='/upload/image/image_02.jpg'
slimboxArray[]['page_12']='/upload/image/image_03.jpg'
slimboxArray[]['page_12']='/upload/image/image_04.jpg'

slimboxArray[]['page_13']='/upload/image/image_01.jpg'
slimboxArray[]['page_13']='/upload/image/image_02.jpg'
slimboxArray[]['page_13']='/upload/image/image_03.jpg'
slimboxArray[]['page_13']='/upload/image/image_04.jpg'
etc etc
</script>



  lib.slimboxArray = COA
  lib.slimboxArray {
   wrap = <script> | </script>
   10 = HMENU
   10.entryLevel = 1

   # 1st level
   10.1 = TMENU
   10.1 {
    expAll = 1
     NO {
	[field:tx_lightbox_lightbox=1]
   		stdWrap.dataWrap = slimboxArray[]['page_{field:uid}']=|
    	[else]
    		stdWrap.dataWrap = slimboxArray[]['page_{field:uid}']=|
    	[end]
    }
   }

   # 2nd level
   20 < .10
   20.1.stdWrap.dataWrap >
   20.1.NO.doNotShowLink = 1
   20.2 < .10.1
   20.2.stdWrap.dataWrap = |

   # 3rd level
   30 < .20
   30.2.stdWrap.dataWrap >
   30.2.NO.doNotShowLink = 1
   30.3 < .10.1
   30.3.stdWrap.dataWrap = |

   # 4th level
   40 < .30
   40.3.stdWrap.dataWrap >
   40.3.NO.doNotShowLink = 1
   40.4 < .10.1
   40.4.stdWrap.dataWrap = |

     # 5th level
   50 < .40
   50.4.stdWrap.dataWrap >
   50.4.NO.doNotShowLink = 1
   50.5 < .10.1
   50.5.stdWrap.dataWrap = |

  }

regards Gijs


More information about the TYPO3-english mailing list