By eipie on
hello,
i changed from from drupal 5 to drupal 6. In 5 i created a view and used a special function to theme this view, so i had to run this function wherever i want and the theming result was always the same. i want to do this in 6 but no chance and now i'm a bit frustrated...
my theme function:
theme_views_view_VIEWNAME(&$view, $type, $nodes, $args) {}
how can i realize this within my module in drupal 6?
thank you!
Comments
Did you register your theme
Did you register your theme function with hook_theme? This is mandatory in drupal 6.
Regards
Werner
Yea, not actually with this
Yea, not actually with this problem, but I did this before and it did not function. So, I tried it again and it does not work.
I'll explain twice. I made a view with the name example. Then I create a module and include the exported views code there. In drupal 5 I could name a function theme_views_view_example(...) and the view was rendered that way I want it. I don't know how I should register the theme function within hook_theme, because I never had to call the theme function by hand. I tried it but as I said, no success.
But I have another solution for my problem. I had to change the "Row Style" from "fields" to "node" and then I use a template file named node-view-example.tpl.php.
I think the solution is fine, perhaps not the best (for example I read that theming with functions is always faster).