Hover menu problem
Posted: Wed Jan 23, 2008 11:14 am
Hello,
It's my first post here.
I start to use cmsmadesimple last month and it's a very nice cms
But i have a problem with a menu:
I create a new plugin in plugins/function.menu_horiz.php
The menu it's ok but in menu i have 2 categories from a catalog (instaled); in this plugin i create a hover function and it's ok, except these 2 menu from catalog= when i click on this menus all menus it's "selected" (hover).
In mycms_content this menus have type=link.
Code:
function smarty_cms_function_menu_horiz(){
global $config;
$sql = "select * from ".cms_db_prefix()."content where parent_id=-1 order by item_order";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
if ($row['type'] == "content"){
$mhlink="index.php?page=".$row['content_alias'];
}
if ($row['type'] == "link") {
$sql="select content from ".cms_db_prefix()."content_props where prop_name='url' and content_id=".$row['content_id'];
$mhdata=mysql_fetch_array(mysql_query($sql));
$mhlink=$mhdata['content'];
}
?>
">
<?
}
}
It's my first post here.
I start to use cmsmadesimple last month and it's a very nice cms

But i have a problem with a menu:
I create a new plugin in plugins/function.menu_horiz.php
The menu it's ok but in menu i have 2 categories from a catalog (instaled); in this plugin i create a hover function and it's ok, except these 2 menu from catalog= when i click on this menus all menus it's "selected" (hover).
In mycms_content this menus have type=link.
Code:
function smarty_cms_function_menu_horiz(){
global $config;
$sql = "select * from ".cms_db_prefix()."content where parent_id=-1 order by item_order";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
if ($row['type'] == "content"){
$mhlink="index.php?page=".$row['content_alias'];
}
if ($row['type'] == "link") {
$sql="select content from ".cms_db_prefix()."content_props where prop_name='url' and content_id=".$row['content_id'];
$mhdata=mysql_fetch_array(mysql_query($sql));
$mhlink=$mhdata['content'];
}
?>
">
<?
}
}