Codeigniter controller does not show dropdown

Asked

Viewed 14 times

0

I’m having a little problem with the dropdown menu and my codeigniter controller. I have in my controller the variables for the dropdown content, but it’s not working. They’re just not working {$DEN}, {$DPT} and {$DES}. All the others work.

Here is the html:

<div class="top-nav">
    <nav class="navbar navbar-default">
        <div class="container">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu                       
            </button>
            <!-- Collect the nav links, forms, and other content for toggling -->
            
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <img src="{$favlogo}" alt="" width="8%" height="auto">
                    <li class="hvr-bounce-to-bottom active">{$homebar}</li>
                    <li class="hvr-bounce-to-bottom">{$aboutUs}</li>
                    <li class="hvr-bounce-to-bottom">{$servicos}</li>
                    <li class="hvr-bounce-to-bottom">{$galeria}</li>
                    <li class="hvr-bounce-to-bottom">{$equipa}</li>
                    <li class="hvr-bounce-to-bottom">{$contactUs}</li>
                    <li class="hvr-bounce-to-bottom">{$user}</li>
                    <li class="hvr-bounce-to-bottom">{$login}</li>
                    <li class="hvr-bounce-to-bottom">{$logout}</li>
                    <li class="hvr-bounce-to-bottom">{$email}</li>
                    <li class="hvr-bounce-to-bottom">{$contacto}</li>
                    <li class="dropdown">
                        <a href="javascript:void(0)" class="dropbtn">Idioma</a>
                        <div class="dropdown-content">
                            {$DEN}
                            {$DPT}
                            {$DES}
                        </div>
                    </li>
                </ul>   
                <div class="clearfix"> </div>
            </div>  
        </div>
    </nav>      
</div>  

And here’s the controller part:

        $data['DPT'] = '<a href="'.base_url('index.php/cart/indexPT').'">Português</a>'; 
        $data['DEN'] = '<a href="'.base_url('index.php/cart/indexEN').'">English</a>'; 
        $data['DES'] = '<a href="'.base_url('index.php/cart/indexES').'">Español</a>'; 

                    //------------------ FOOTER              ----------------------
        $data['footercontactUS'] = '<a href="'.base_url('index.php/cart/contactUS').'">Contacte-nos</a>';
        $data['footeraboutUS'] = '<a href="'.base_url('index.php/cart/aboutUS').'">Sobre Nós</a>';
        return $data;
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.