By: Fabian
Date: 2005-09-09
Time: 11:42
|
How to know the block is iterating the last item?
Hi all,
I'm giving a try to TBS and my first impressions are good. I'm trying to build a simple menu.
Here's the PHP
$default_menu = array(
array("text" => "Menu 1", "link" => "index.php"),
array("text" => "Menu 2", "link" => "index2.php"),
);
|
And here's the template
<div id="menu">
[menu;block=begin]
<a href="[menu.link]">[menu.text]</a> |
[menu;block=end]
</div>
|
As you ca see, i'm separating menu items with a pipe. What I want to do is to remove the last pipe.
Any clues?
|
By: Fabian
Date: 2005-09-09
Time: 11:43
|
Re: How to know the block is iterating the last item?
Oops, forgot to add the main php call
$TBS->MergeBlock("menu", $default_menu);
|
Btw, is there a way to edit or preview our post?
|
By: Skrol29
Date: 2005-09-09
Time: 13:07
|
Re: How to know the block is iterating the last item?
> Btw, is there a way to edit or preview our post?
No sorry,
|
By: Skrol29
Date: 2005-09-09
Time: 13:08
|
Re: How to know the block is iterating the last item?
Put your pipe ("|") inside a special section wich has parameter "splittergrp".
See Examples/Grouping...
|
|
Posting in progress.
Please wait...
|