Template Installation: variable undefined notice
Posted: Tue Aug 12, 2008 1:19 pm
hello!
I have just finished to install a template Siteground42 in joomla 1.5, and i have some errors:
After the problem of text alignment, and the legacy module query,
I have this and i want to know his meaning and how to solve it
Notice: Undefined variable: gid in C:\Program Files\EasyPHP 2.0b1\www\Joomla_Fr\templates\siteground42\menu.php on line 8
here the code of menu.php
<div class="div">
<div id="menu">
<div class="menuc">
<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 5";
$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>
</div>
</div>
</div>
Thank for u'r help...
I have just finished to install a template Siteground42 in joomla 1.5, and i have some errors:
After the problem of text alignment, and the legacy module query,
I have this and i want to know his meaning and how to solve it
Notice: Undefined variable: gid in C:\Program Files\EasyPHP 2.0b1\www\Joomla_Fr\templates\siteground42\menu.php on line 8
here the code of menu.php
<div class="div">
<div id="menu">
<div class="menuc">
<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 5";
$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>
</div>
</div>
</div>
Thank for u'r help...