[development] Question on #theme attribute in D6 FAPI

Syscrusher syscrusher at 4th.com
Thu Jul 10 01:22:54 UTC 2008

On Wed, 2008-07-09 at 19:48 -0400, Darrel O'Pry wrote:
> Did you add the #theme function to hook_theme? #theme should work the
> same. I don't believe there were any changes to how it is handled in
> drupal_render.

Thanks for the quick reply, but now I'm confused. With regard to
registering my theme function, no, I didn't realize I needed to do that.
Is this necessary for the FAPI to call a theme function that is
referenced in the $form array? IOW, just declaring the function in the
$form array doesn't imply that it should be called?

I went to the hook_theme documentation, but I'm unclear on how those
registration parameters apply to FAPI clients; the documentation seems
to speak from the viewpoint of the theme writer. I'm not writing a
theme, just needing to wrap form elements into a table from the
drupal_render() call. I embed class and ID attributes in the table which
the theme can modify for aesthetics -- IOW, my module only applies the
document structure elements without regard to their cosmetics at display

Am I taking the wrong approach to this?


Syscrusher <syscrusher at 4th.com>

More information about the development mailing list