[Typo3] two questions concerning TMENU

Michael Scharkow mscharkow at gmx.net
Wed Oct 5 19:10:06 CEST 2005


Martin Kindler wrote:
> 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 ;)

http://typo3.org/documentation/document-library/doc_core_tsref/optionSplit/

Greetings,
Michael



More information about the TYPO3-english mailing list