[development] Question on #theme attribute in D6 FAPI

Darrel O'Pry darrel.opry at gmail.com
Wed Jul 9 23:48:46 UTC 2008

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


On Wed, Jul 9, 2008 at 7:32 PM, Syscrusher <syscrusher at 4th.com> wrote:

> Good evening!
> I have a form that works fine in Drupal 5 and uses the #theme attribute
> to invoke a user-defined function. I'm trying to update the module to
> Drupal 6, and am getting no errors, but the #theme function is no longer
> being invoked (I placed trace statements there, and am using
> devel.module for diagnostic printing using dprint_r()).
> I checked the upgrade-your-module documentation (which is excellent,
> btw), but there's no mention of a change to how #theme works. Have I
> overlooked a change that's documented elsewhere?
> Here are the code snippets. In the code that generates the $form array,
> I have this:
>        $form['links_related']['#theme'] = 'links_related_form';
> and the theme function is defined thusly:
>        function theme_links_related_form($form)
> I have a trace print() statement right inside that function as the first
> line, so I know the function isn't being called.
> By the way, the form itself generates and executes correctly, with all
> fields working. The only problem is that the theming isn't being called,
> so I'm getting plain vanilla output rather than the table that is
> supposed to neatly align the columns (my theme function calls Drupal's
> core theme('table', ....) function to do this).
> Again, this worked in D5, so I'm looking for what needs to change for
> D6.
> Thanks for any suggestions.
> Scott
> --
> Syscrusher <syscrusher at 4th.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080709/3f17c716/attachment.htm 

More information about the development mailing list