$page->getCollectionPath() help

Permalink
Hi,
I’m trying to set up a multi language selection dropdown which goes to the correct page for the relating language.
I have setup each page language under their corresponding suffix.
On the dropdown for example I have used
<li><a title="German" class="de" href="/de<?php echo $page->getCollectionPath (); ?>">Deutsch</a></li>
This works well when I am in English as there is no language suffix but if I am in French the url it tries to select is /de/fr/page1/page2.

Is there a way I could remove the first folder fr using the getcollectionpath();

edbeeny
 
kino replied on at Permalink Best Answer Reply
kino
<?php
   $path = "/fr/page1/page2";
   echo substr($path,strpos($path,'/',1));
?>
edbeeny replied on at Permalink Reply
edbeeny
Kino,

Your a star, thank you works perfectly.