redDIRT's blog
why won't my form element validate?
By redDIRT on July 31st, 2009 at 11:23pm ()yahoo!
So, just because there is already a lot of code in your template.php, and you can modify your forms with the theme template function, remember that you CAN'T code a validation callback there. Add your callback to the element in the hook_form_alter in your custom module ...
add your form element in custom module NOT in template.php:
Child Menus don't work, even when 'expand' is forced
By redDIRT on February 18th, 2009 at 04:49am ()Using the $primary_links variable in page.tpl.php doesn’t include the child items, even when Expanded is selected in the Drupal menu config. I tried a number of different theme functions, but nothing seemed to work. What did work finally was calling from the page.tpl.php
print theme('menu_tree','primary-links');
For the id, I used the template.php function:
function phptemplate_menu_tree($tree) {
$id=strpos($tree,'href="/"')!==FALSE?' id="primarylinks"':'';
return '';
}