This module is fantastic -- thanks for putting it out there.
Unfortunately, the site where I most want to use it (www.newamerica.net) makes heavy use of CCK and node-content_xxxx.tpl.php files that don't have the $content or $body variable at all -- each field is called in directly. For example:
print $field_subhed[0]['view'];
As a result (at least I assume that's the cause), Slideshow doesn't work with our theme.
So my question is this: Is there a hook of some sort that we could embed into our templates to call in a node's slideshow? To get attachments displaying properly, for example, we had to do this:
$node = node_load(arg(1));
if (isset($node->files) && count($node->files)) {
print theme('upload_attachments', $node->files);
}
I know CCK has gotten better about playing nicely with hooks in Drupal 5, but our nodetypes were built in 4.7 (we just upgraded to 5 last week). So I'm hoping there's a fairly simple work-around that we can use -- rebuilding our theme to get everything working via $content is just more than we can tackle right now!...
Thanks in advance for any help you can offer.
Comments
Comment #1
ssherriff commentedI also need this...does anyone have a solution? I've spent 4 hours trying to figure out how to get this done and it's obvious I just can't figure it out. I made the mistake of deciding to switch over to Slideshow and now am completely stuck without the ability to make the slideshow display.
I've tried doing:
I just get an error. I believe it has something to do with the javascript. Since there is only one place I use it in my site I decided to temporarily hack it to work, so I took the writing of the javascript out of the theme function and put it in my tpl file. This took away the error, but all that happened is the previous and next items show up, but they don't work, and there aren't any images.
Thank you for all the work in this module, it looks like it is useful, but I think custom display of node types is quite common, so it would be horrible if it couldn't be used in a custom display of a node type. I know a bit of php myself, but I just couldn't figure out how to make it work or else I would have done a patch for any others.
Cheers,
Steph
Comment #2
TKS commentedSteph:
Don't have an answer for you -- sorry -- but there are a couple places where you can get a bit more info.
1. Konstantin started a group over at groups.drupal.org to kick around next-version ideas, there's the beginnings of an interesting thread on this issue: http://groups.drupal.org/node/4058.
2. There's a different module that's CCK-based, which is in the works but not quite released yet: http://drupal.org/project/cck_slideshow. It has a lot more dependencies that Slideshow (CCK, imagefield, imagecache, some jquery stuff...), but it's definitely geared to the custom-page site.
One last tip, since it sounds like you know more PHP that I do. The Service_Links module keys off of the standard body and links fields, but also offers the option of a custom function and a bit of code that can drop into a template anywhere you'd like. I couldn't figure out how to do the same with the Slideshow module, but maybe you can? (If so, please post the patch!)
Hope that helps. One way or another, I think there's a solution to be had in the very near future...
TKS
Comment #3
kkaefer commentedIt should be
echo drupal_render($node->content['slideshow']);. Please verify if it’s still an issue.