Sorry for the newby question.
I'm not a programmer but want to change a bit of the phptemplate theme. using the contaire.com - A Corporate Website Based On Drupal article as a basis. I've also looked on their website at the article A Corporate Website Based On Drupal, which is almost identical.
In addition, Drupaldocs section on menus is a good reference but only if someone knows where to begin. I unfortunately don't.
I changed the contAire code to :
function _global_menu($pid = 1) {
$menu = menu_get_menu();
$entries = array();
if (isset($menu['visible'][$pid]) && $menu['visible'][$pid]['children'])
{
foreach ($menu['visible'][$pid]['children'] as $mid) {
$style = (count($menu['visible'][$mid]['children'])
? (menu_in_active_trail($mid)
? 'expanded' : 'collapsed')
: 'leaf');
$entry = array('style' => $style, 'link' => theme('menu_item', $mid));
$entry['children'] = _global_menu($mid);
$entries[] = $entry;
}
}
return $entries;
}
function global_menu($pid = 1) {
return _phptemplate_callback('_menu',
array('pid' => $pid, 'entries' => _global_menu($pid)));
}
In the template.php file in my themes > engines > phptemplate folder on the server after the class Template call on line 26 of the template.php file.
Then in page.tpl.php in the themes directory (manji, in this case) I added to line 31:
<?php function global_menu(73) ?>
to call the MenuID for the custom menu I made.
contAire uses:
<div tal:content="php:contaire_menu(26)" />
But I don't know how to translate that to plain php syntax.
i then receive the error:
Parse error: parse error, unexpected T_LNUMBER, expecting ')' in ...page.tpl.php on line 31
I realize I must be making some horrific coding errors, but there is nowhere I have found to document simple calls pull in a specific variable... I understand that the menu is getting loaded into an array "entries" but then is being called by its $mid, but the function is asking for the pid, which is confusing to me.
I greatly appreciate anyone's help on this.
Brett