Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:51:20+00:00 2026-05-26T22:51:20+00:00

I just noticed a problem with my menu. I’m working on a php application,

  • 0

I just noticed a problem with my menu. I’m working on a php application, with Zend Framework. It looks like an empty text line is inserted in my menu and I don’t understand why. For example …
Menu with empty space

As you can see, an empty space is between elements I added manually and elements generated with my menu.phtml. Here’s my code …

First, because I have 3 different menus, I saved them in Zend_Register, in my bootstrap, but I’ll just show you the code for my anonymous menu.

        protected function _initNavigation()
    {
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();

        //Init du menu anonyme
        $config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'menuNotLogged');    
        $container = new Zend_Navigation($config);
        Zend_Registry::set('main',$container);
        $view->navigation($container);}

Then, in my layout I display my menu …

<div id="navigation">
<ul id="primary-links">
<li id="overview"><a href="#">Overview test</a></li>
<li><a href="#">Manual test</a></li>
<?php
$partial = array('menu.phtml', 'default');
$this->navigation()->menu()->setPartial($partial);          

    echo $this->navigation()->menu()->render(Zend_Registry::get('main'));
?>
</ul>
</div>

Now my menu.phtml …

foreach ($this->container as $page) {
    if ($page->isVisible()) {
        if ($page->isActive(true)) {
        //... not active so it doesn't enter here
        } else {
               echo '<li>'.$this->navigation()->menu()->htmlify($page). '</li>' ;
        }
    }
}

I tried to debug my menu in Firebug(FF) and Developer Tools(IE8), it shows empty text in the menu like that (First image is IE, second is Firefox)
Empty text ode enter image description here

There is an empty item and I can’t see where it come from! I noticed it because I need to change the template of my application, and with the old menu it did the same thing, but I didn’t see it, now it’s really … visible.

It really seems to be a problem when I render my menu, because if I add elements manually, there is no problem. Looking at my code, do you have any idea of what could cause that ? Does someone ever had the same problem ? Do you need other parts of my code or other details ?

Thanks already !

UPDATE

This is my menuNotLogged in my navigation.xml

   <menuNotLogged>
     <home>
        <label>Home</label>
        <uri>/index</uri>
     </home>
     <login>
        <label>Login</label>
        <uri>/index/login</uri>
     </login>
</menuNotLogged>

Here is the html output as asked

<!-- NAVIGATION_BEGIN -->
<div id="ibm-navigation">
    <ul id="ibm-primary-links">
    <li id="ibm-overview"><a href="http://w3">Overview test</a></li> 
    <li><a href="http://w3">Manual test</a></li> 

<li><a href="/index">Accueil</a></li><li><a href="/index/login">Authentification</a></li>
</ul></div>

The empty line is there in my Debug Output view from Zend Studio and in Firebug too. It’s probably because of this line that an empty item is added, but I don’t know where it come from.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:51:21+00:00Added an answer on May 26, 2026 at 10:51 pm

    Is there a element in your configuration menuNotLogged without a label maybe? And why do you use partials to render your menu and not like: echo $this->navigation()->menu(Zend_Registry::get('main'))->render(); ? Could you please post the exact output HTML where the problem is I cannot really get the picture you have posted..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on this website and have just noticed a problem with the
Just noticed that the style of the navigation menu on windows.com is just what
I have a great working 3 panel liquid layout but I just noticed that
I just noticed a PHP config parameter called allow_url_include , which allows you to
I have just noticed a problem accessing a CSS file using forms authentication from
I have a problem with IE7, i just noticed couple days ago that my
I just noticed something weird, when creating a menu for a website. Take a
I just noticed that declaring two empty lists as: list1 = list2 = []
I just noticed and odd behavior. I am working in a cms. If I
I just noticed a problem when my user-interface is in a certain state. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.