function power_menu_get_tids in Power Menu 7
Same name and namespace in other branches
- 6 power_menu.module \power_menu_get_tids()
get a term id from a given mlid this can be used to find out if a menu item is connected to a taxonomy term
Parameters
array $mlid:
1 call to power_menu_get_tids()
- _power_menu_form_alter in ./
power_menu.forms.inc - @file manipulation of the forms
File
- ./
power_menu.module, line 545 - This module provides some additional menu features. The features are not actually new, but are part of other modules. it's though very cumbersome to creating a new menu item, because one has to go to all the different places to configure these…
Code
function power_menu_get_tids($mlid) {
$ar = array();
$result = db_query("SELECT amt.tid,td.vid,td.name, amt.nodetype FROM {power_menu} amt LEFT JOIN {taxonomy_term_data} td ON amt.tid = td.tid\n WHERE mlid = :mlid", array(
':mlid' => $mlid,
));
foreach ($result as $row) {
$ar[] = $row;
}
return $ar;
}