hello,
I got a question...
In my navigation.ss there are te following lines
<% control Menu(1) %>
<a href="$Link" title="Go to the $Title.XML page" class="topmenu_text"><span>$MenuTitle</span></a>counter
<% end_control %>
When i show the menu on the page it looks like
item1 item2 item3
I want to let it look like
item1 | item2 | item3
I've made a php solution, but it does not work into the ss files
the solution looks like this
function MyMenu() {
$query="select * from SiteTree where parentid='0' order by sort";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$i=0;
while ($i < $num) {
//vul variabelen met de waardes uit de database
//$variable=mysql_result($result,$i,"fieldname");
//$content[$i]=mysql_result($result,$i,"content");
$title[$i]=mysql_result($result,$i,"Title");
//print_r(mysql_fetch_lengths($result));
//echo $title[$i];
$i++;
$topmenu="";
}
if ($num=0){
$topmenu="sukkel";
};
for ($menu_counter=0;$menu_counter<$i; $menu_counter++)
{
{
if ($menu_counter < ($i-1))
{
$menutext=str_replace(" ","-",$title[$menu_counter]);
$topmenu= $topmenu."<a style='font-size:16px;color:black;font-weight:bold;' href='$menutext/'>".$title[$menu_counter]."</a>"."<span class=menu_bar> | </span>";
}
else
{
$menutext=str_replace(" ","-",$title[$menu_counter]);
$topmenu = $topmenu."<a style='font-size:16px;color:black;font-weight:bold;' href='$menutext/'>".$title[$menu_counter]."</a>";
}
}
}
return $topmenu;
}
in my page.ss i call this function as original, but when i want to make this website multilanguage
it work, but it shows all the menu items.
Im struggling with languages
i've three languages nl_NL, de_DE, us_EN
I take the ?locale= extention in the url by $_GET("locale), but when i hit another menu item there is no $_GET("locale).
So i went to the solution above.
My question is to make navigation.ss working like the php function above.
I hope someone can tell me PLZ