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 http://www.htmldog.com/articles/suckerfish/example/
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' => 'http://www.aldo-graphics.sh', 'pointVal' => 'ALDO Graphics'),
1 => array('pointKey' => 'http://www.schleswiger-ballettschule.de', 'pointVal' => 'Schleswiger Ballettschule'),
2 => array('pointKey' => 'image', 'pointVal' => $imgFile),
3 => array('pointKey' => 'http://www.csszengarden.com/tr/deutsch/?cssfile=/202/202.css&page=0', 'pointVal' => 'Zengarden Cinema'),
4 => array('pointKey' => 'http://www.zoo-berlin.de/erleben/jungtiere/eisbaer-knut.html', 'pointVal' => 'Knut'),
5 => array('pointKey' => 'http://www.amazon.de/gp/reader/3826616154/ref=sib_dp_pt/028-8205377-0982146#reader-link', 'pointVal' => 'Dynamische Webseiten in der Praxis')
);
extract of html-file
<li id="last">
<div><a href="">Contact</a></div>
<ul>
<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>
</ul>
</li>
|
I would be glad, if there is somebody who is very familiar with - or don't I need that for my code?
|