Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have file "header.html" in partial folder, here my code



and I have file "shoesmart.php" in plugins folder, here my code :

function showMenu()
{
$return = '';

$menu_list = $this->db->select('*,CONCAT(pua.type,"/",pua.keyword) as path',false)
->from('menu mn')
->join('product_url_alias pua','mn.url_alias_id=pua.url_alias_id','LEFT')
->where('status',1)
->get()
->result_array();

foreach ($menu_list as $result) {
$return[] = array(
'name' => $result['name'],
'url' => BASE_URL.'home/'.$result['path']
);
}
return $return;
}

and my table name in database is "default_menu" that have structure:
menu_id url_alias_id name status parent_id
1 868 Men 1 0
2 869 woman 1 0

but when I refresh in browser, just show main menu, its mean that the submenu didn't show. Should I change my code ? or I also add new table for submenu in my database ?So please help me .. I have deadline project tomorrow T.T
Posted
Comments
Suvendu Shekhar Giri 1-Dec-15 22:47pm    
Format the code correctly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900