I can't figure out where the code listed in Listing 24 is supposed to go?
Should it go in template.php, or does it go in announcement.module? Or is there another place it is supposed to go.
Also, should the function names: "theme_announcement_xxx" be changed to reflect the theme I am using? ie, should they be "pushbutton_announcement_xxx" if I am using pushbutton?
Pinned topic Part 6: Listing 24, where do theme functions go?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2006-10-17T18:53:54Z at 2006-10-17T18:53:54Z by SystemAdmin
SystemAdmin 110000D4XK161 Posts
Re: Part 6: Listing 24, where do theme functions go?2006-10-17T18:53:54ZThis is the accepted answer. This is the accepted answer.We placed the functions you see in Listing 24 in the announcement module purely for convenience. However, any overriding theme functions used by the phptemplate engine are probably more appropriately placed in the template.php file. This way you keep any phptemplate theme customizations outside of your module.
The way the Drupal theme system selects a theme function can be a little confusing and is explained in more depth in Part 7. Figure 6 attempts to illustrate how Drupal selects a theme function and the naming conventions.
Hope this helps.