Categories > Your tips & tricks >

Any experiences with blocks and conditional sections?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Olifants
Date: 2007-05-18
Time: 21:01

Any experiences with blocks and conditional sections?

Since my testing with templates I found a site with a nice little menue on it which I want to modify to fit tbs as a workout.
You can see the menue at
But for my regretfulness I'm not able to do this.

Here is a piece of the modified code with which I tried my luck. In the menue there are for example 2 words, than a picture and after that 3 words again. For the menue I created an array:

extract of php-file

$imgFile = $customerDirImg . '/' . 'remora3.gif';
$contactLoop = array(
                     0 => array('pointKey' => '', 'pointVal' => 'ALDO Graphics'),
                     1 => array('pointKey' => '', 'pointVal' => 'Schleswiger Ballettschule'),
                     2 => array('pointKey' => 'image', 'pointVal' => $imgFile),
                     3 => array('pointKey' => '', 'pointVal' => 'Zengarden Cinema'),
                     4 => array('pointKey' => '', 'pointVal' => 'Knut'),
                     5 => array('pointKey' => '', 'pointVal' => 'Dynamische Webseiten in der Praxis')

extract of html-file

<li id="last">
   <div><a href="">Contact</a></div>
         <li><a href="[contactLoop.pointKey;block=li;when [contactLoop.pointKey]!='';several]">[contactLoop.pointVal;when [contactLoop.pointKey]!='']</a></li>
         <li><img src="[contactLoop.pointVal;when [contactLoop.pointKey]='image']" width="100" height="27" alt="Remora" /></li>

I would be glad, if there is somebody who is very familiar with  - or don't I need that for my code?