Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
The module I am working on will provide a new node type that will be rendered in a certain way.
Now, I have my hook_view function ready with returning a structured content array, but I also want to pass this content to a custom theme fuction. How should I implement this?
- Should topic_view call theme_topic and return rendered html content?
- Should I just implement a theme_?? function and rely on it being appropriately called when a node of type "topic" should get displayed (and what should "??" be)?
Hi guys, I've never written a Drupal module before, but have been experimenting a bit in the past few days.
I've written a function to implement hook_nodeapi, so I could supply some additional links to the $node object.
But I can't figure out how to add a javascript link into my $node->links['test_js'] array.
The following code is functional, but the javascript is printet out as an internal link. Eg. ?q=javascript:alert('hei')