justtech Posted December 24, 2007 Share Posted December 24, 2007 I am customizing a template to fit my site. I have hit a road block in my Joomla, php, css learning experience and have come here to see if any of you could offer any assistance. With the template... it calls out to a "menu.php" to get the top navigation bar. When it does this, it looks perfect but the buttons don't work properly. It uses my "mainmenu" and one of my buttons is supposed to call out to my forum. It works perfectly in the left column but something is wrong in the top. When I try and pull everything from the "mainmenu" or "topmenu" module, it just looks and operates awful. Below I will post what the code looks like and an image to show what it looks like live. Any help would be appreciated. Here is the menu.php: <div id="menucenter"> <table cellpadding="0" cellspacing="0" style="margin:0 auto;"> <tr> <td class="menu_m"> <div id="topnavi"> <ul> <?php $item_id = mysql_escape_string( $_GET['Itemid'] ); $qry = "SELECT id, name, link FROM #__menu WHERE menutype='mainmenu' and parent='0' AND access<='$gid' AND sublevel='0' AND published='1' ORDER BY ordering LIMIT 6"; $database->setQuery($qry); $rows = $database->loadObjectList(); foreach($rows as $row) { echo "<li><a href='$row->link&Itemid=$row->id' ".( $row->id == $item_id ? "class='current'" : "" )." ><span>$row->name</span></a></li>"; } ?> </ul> </div> </td> </tr> </table> </div> Here is the section calling menu.php in the original index.php: <div id="top"> <?php include'menu.php'; ?> <div id="header"> <div id="sitename"> <p><?php echo $GLOBALS['mosConfig_sitename']?></p> </div> </div> </div> This is what it looks like with the original index.php calling out to menu.php: Here is how I tried to bypass the original menu.php and just call directly to the .css file: <div id="top"> <div id="menucenter"> <div id="menu_m"> <div id="topnavi"> <?php mosLoadModules('top', '1'); ?> </div> </div> </div> <div id="header"> <div id="sitename"> <p><?php echo $GLOBALS['mosConfig_sitename']?></p> </div> </div> And this is what it looked like afterwards: Besides the obvious look being all messed up with out the li padding, it is also messing up my links by calling id numbers. I just need it to call the same link as main menu on the left hand side of the page. Any help would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/83062-php-css-joomla-template-help/ Share on other sites More sharing options...
justtech Posted December 25, 2007 Author Share Posted December 25, 2007 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/83062-php-css-joomla-template-help/#findComment-422886 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.