Jump to content

Recommended Posts

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:

menuphp.gif

 

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:

menucss.gif

 

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.

Link to comment
https://forums.phpfreaks.com/topic/83062-php-css-joomla-template-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.