[support] random images - how to choose which galleries?
jp.stacey at torchbox.com
jp.stacey at torchbox.com
Thu Jun 21 08:13:28 UTC 2007
> > we have a block that displays random images, works great except that it
> > grabs all images from our galleries. how can we set it to only grab
> > images from selected galleries?
> >
> > drupal 4.7 but soon on 5.1
>
> I believe you can use Views to do that.
Yes: we've got a random teaser that uses a view: the view is set to be
randomly ordered, filtering on the "Rotating teaser" gallery, and
returning a single node in block mode. Then, in the template, we drop:
<?php
$done = views_block("view", "RandomTeaser");
print $done["content"];
?>
You could potentially use this to provide teasers pertaining to your
current page, by feeding in the page's categorisation as an argument....
That's not something we've looked into, though.
J-P
More information about the support
mailing list