Hi there,
I was wondering if someone could offer me an example of some hook_nodecarousel code. I have no experience with hook functions. Where to put the function (in the theme template?) and what does it need to return? Can I use a view to return the relevant nodes?
I have read the documentation, but I need some code snippet to get started...
Any help would be appreciated,
Thanks in advance!
Comments
Comment #1
jcfiala commentedRight, so, the hook_nodecarousel is invoked when you want to return your nodes as you've picked them.
The basic idea is that you put hook_nodecarousel in a module that you're writing, not the theme.
Let's say that you've created the module misc_module, which includes a misc_module.info and misc_module.module file, right? We're going to write a simple query that returns the most recent blog nodes for the 'test_nodecarousel' nodecarousel. (That's the nodecarousel name - since you can have multiple nodecarousels on a site, they have different names.) The misc_module.module file would contain:
Yes, if you were doing the most recent blog items, you would use the other settings, but I needed a simple example.
Comment #2
avpadernoI am closing this issue, since Drupal 6 isn't supported anymore.