<?php

/*

function startsWith($haystack, $needle) {

    // search backwards starting from haystack length characters from the end

    return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;

}



if ($this->editmode){

    while($this->block("contentblock")->loop()){

        if(! $this->editmode) echo '<li>';

        echo $this->link("menu-link");

        if(! $this->editmode) echo '</li>';

    }

}else {







    echo '<ul class="main-menu">';

    foreach($this->document->elements['contentblock']->indices as $i){



        $e = $this->document->elements['menu-linkcontentblock' . $i];



        if($e instanceof \Pimcore\Model\Document\Tag\Link){

            $active ='';

            $url = $e->data['path'];

            $request = $_SERVER["REQUEST_URI"];



            if($request == $url){

                //page courrante => désactiver le lien

                echo '<li><a data="' . $request . '-' . $url . '">' . $e->data['text'] . '</a>';

            }elseif( strpos($url,'#') == strlen($request)){

                //page courrante + anchor => activer anchor uniquement

                echo '<li><a href="'. substr($url, strlen($request)) .'">' . $e->data['text'] . '</a>';

            }else{

                //lien sur une autre page => normal

                echo '<li><a href="'. $url .'">' . $e->data['text'] . '</a>';

            }



        }

    }

    echo '</ul>';



}*/



if ($this->lang == 'fr' ){

    echo '<ul class="main-menu">

                    <li><a class="" href="/fr/agences">Vous êtes une agence ?</a></li>

                    <li><a href="/fr/home/#presse">Presse</a></li>

                    <li><a href="/fr/home/#footer">Contact </a></li>

</ul>';

}else

    echo '<ul class="main-menu"><li><a href="/nl/search" class="">Vind een agentschap</a></li><li><a href="/nl/diensten">Onze diensten</a></li><li><a href="#about-us-wide" class="">Wie zijn wij ?</a></li><li><a href="#prices-wide" class="">Tarieven</a></li><li><a href="#contact-us-wide" class="">Contacteer ons</a></li></ul>';