Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to move the menu into the panel

edited October 2007 in Vanilla 1.0 Help
Hi there, how can I move the Top menu (e.g. Discussions Categories Search Account Troubleshooting FAQs) into the panel? I've found the menu in the menu.php but when I copy the code into the panel.php I get the error "Warning: Variable passed to each() is not an array or object in /*********/themes/panel.php on line 46" What can I do to get it working? Please Help and Thank You

Comments

  • The theme A Beautiful Lie has the menu in the side panel. You might want to see what was done there.
  • I also did it at http://www.christian-lyrics.net/community

    basically all you do is move the panel div tag from the bottom of the page to the top in panel.php and then change the tags for the tabs
  • And I do have to say...Chris did an AMAZING job with our theme - thank you so much Chris!
  • edited October 2007
    I'm a total PHP neophyte, so please excuse my ignorance. I've tried moving

    echo '<ul>'; while (list($Key, $Tab) = each($this->Tabs)) { echo '<li'.$this->TabClass($this->CurrentTab, $Tab['Value']).'><a href="'.$Tab['Url'].'" '.$Tab['Attributes'].'>'.$Tab['Text'].'</a></li>'; } echo '</ul>';

    from menu.php over to the relevant spot in panel.php, but when i refresh the page i get this error:

    Warning: Variable passed to each() is not an array or object in /home/thescot2/public_html/apathy/themes/state/panel.php on line 29

    not entirely sure if this is what Vincent was suggesting, but this made sense to me. Apparently it doesn't quite make sense to vanilla. Any tips?
  • As far as I remember, themes/menu.php and themes/panel.php are called by different bits of the software, so the menu may not work if you move it to the Panel. Vincent's suggestion to shift the opening div for panel out of panel.php and into menu.php above the ul's probably works better. You can of course simply style the menu and the panel to appear above each other...
  • edited October 2007
    jakob_r,

    thanks! that worked a treat. the menu now shows up in the left. unfortunately, it seems that the #content div isn't going where it should be. cssedit's preview shows it as sticking itself directly under the last item in the panel, and not where it should be. not sure why, as none of the basic HTML structure has changed, right? i feel like maybe i missed a closing tag somewhere, but i don't think so - it does pass validation with only one non-related error. if anybody has any suggestions in the meantime, fire away:

    EDIT: got it! forgot to amke sure that the body div was called before the panel div. all is well now.
  • May we see it? Huh? Can we please? pic

    Posted: Saturday, 27 October 2007 at 8:46AM

This discussion has been closed.