[Typo3] two questions concerning TMENU

Martin Kindler kindlerm at arcor.de
Thu Oct 6 11:03:54 CEST 2005


Thank you!

That does the job

Martin

> -----Ursprüngliche Nachricht-----
> Von: typo3-english-bounces at lists.netfielders.de 
> [mailto:typo3-english-bounces at lists.netfielders.de] Im Auftrag von JoH
> Gesendet: Mittwoch, 5. Oktober 2005 19:41
> An: typo3-english at lists.netfielders.de
> Betreff: Re: [Typo3] two questions concerning TMENU
> 
> 
> >> I am trying to build a TMENU which is made from a table structure 
> >> like this
> >>
> >> <tr>
> >> <td>menuitem1</td>
> >> ...
> >> <td>menuitemN</td>
> >> </tr>
> >>
> >> Each table cell has an associated background image which 
> changes from 
> >> NO to ACT state. The background images are designed to build a 
> >> panorama, i. e. the background image of the cells
> >> together form a larger picture.
> >>
> >> I have the problem that I need to calculate the name of each 
> >> background image based on the position in the menu. The first one 
> >> will be like "bgimage_0.gif", the second "bgimage_1.gif", etc.
> >>
> >> How can this be done? Currently I have simply a wrap 
> defined with a 
> >> constant defining the image.
> >>
> >> Second question: the panorama should be repeating. This 
> means that my 
> >> panorama contains, say 4 elements. If my menu has more than 4 
> >> elements the background images should repeat.
> >> As I have them numbered I would expect something like
> >> "bgimage_" + (currentPositionInMenu % numberOfImages)
> >> (+ concatenation, % the modulo operator)
> >> Is this possible?
> >
> > Seems like a job for optionsplit, although I'm not sure it 
> can rotate 
> > four image types. Plus my head explodes with examples 
> including more 
> > than two options. Ask Joey ;)
> 
> So here we go ;-)
> 
> optionSplit can rotate the wraps for the items.
> Everything inside the |*|-markers is repeated and rotated.
> 
> allWrap = |*|<td class="1">|</td>||<td class="2">|</td>||<td 
> class="3">|</td>||<td class="4">|</td>|*|
> 
> And then assign the bgimage_x to each class.
> 
> Joey
> 
> -- 
> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
> (If you have no clues: simply shut your knob sometimes!)
> Dieter Nuhr, German comedian
> openBC: http://www.openbc.com/go/invuid/Jo_Hasenau
> 
> 
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 





More information about the TYPO3-english mailing list