IE7 and conditional menu problem

IE7 and conditional menu problem

by Richard Oelmann -
Number of replies: 5
Picture of Core developers Picture of Plugin developers Picture of Testers

I am using a combination of Mary Evans' Aardvark-Lightheaded theme with the YUI menu from Shaun's Aardvark_Pro_1.4. I have also added a conditional menu which is dependant on the user (in my case,because I was already using it for other things, I used a Department setting on the user profile rather than user roles)

The system works well on IE8, FF, Chrome and Safari. However, I get a problem on IE7 in that the menus for everyone work fine, but the conditional menu, only the heading on the main menu bar shows and not the drop down.

I've attached screenshot and a snippet of the menu code whch shows the php used for the conditional menu.

Any suggestions would b greatly appreciated

Richard

Average of ratings: -
In reply to Richard Oelmann

Re: IE7 and conditional menu problem

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

Apologies -forgot to attach screenshot and clip!

Richard

     <?php if (isloggedin() && $USER->department == 'Parent') { ?>
          <li class="yuimenubaritem"><a class="yuimenubaritemlabel" href="#">Fourth menu</a>

            <div class="yuimenu">
              <div class="bd">                                       
                <ul>
                  <li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">First Menu Item</a></li>
                  <li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">Second Menu Item</a></li>
                  <li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">Third Menu Item</a></li>
                </ul>
              </div>
            </div>                                       

          </li>
        <?php } else { ?>

           <li> </li>

    <?php } ?>

Attachment screenshot1.png
In reply to Richard Oelmann

Re: IE7 and conditional menu problem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Richard,

Is the behaviour of your site in IE7 when you physically use that browser version or is it in compatibility mode in IE8. If the latter then it may be giving you a false view of things.

Mary
In reply to Mary Evans

Re: IE7 and conditional menu problem

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
Does it in both Mary,
First spotted it in IE8 compatibility mode and initially put it down to that, but when I checked on a WinXP desktop actually running IE7 the same thing happens.

Richard
In reply to Richard Oelmann

Re: IE7 and conditional menu problem

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
In that case then, Richard, could it be IE7 just does not like the <li></li> tags after the if else conditional statement?

I was wondering if it might be better to write the conditional statement just as...

<?php if (isloggedin() && $USER->department == 'Parent') {

echo '<li class="yuimenubaritem">';
echo '<a class="yuimenubaritemlabel" href="#">Fourth menu</a>';
echo '<div class="yuimenu">';
echo '<div class="bd">';
echo '<ul><li class="yuimenuitem">';
echo '<a class="yuimenuitemlabel" href="#">First Menu Item</a></li>';
echo '<li class="yuimenuitem">';
echo '<a class="yuimenuitemlabel" href="#">Second Menu Item</a></li>';
echo '<li class="yuimenuitem">';
echo '<a class="yuimenuitemlabel" href="#">Third Menu Item</a></li>';
echo '</ul></div></div></li>';
}
?>


Just a thought...
In reply to Mary Evans

Re: IE7 and conditional menu problem

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Mary,
Have tried your suggestion - unfortunately without success sad

Richard