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
thanks! will theicarusproject.net
On Wednesday 20 June 2007 11:02:29 will hall wrote:
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. The 5.x audio module has a random audio nodes block you can use as a guide. Just add to it a filter on taxonomy term and specify all the terms you want to draw from.
hi there, thanks for your reply. i don't think we are using views to accomplish the random image block at the moment:
http://www.theicarusproject.net/
i'm not even sure where the random image block got in there...
thanks! -- will
Jason Flatt wrote:
On Wednesday 20 June 2007 11:02:29 will hall wrote:
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. The 5.x audio module has a random audio nodes block you can use as a guide. Just add to it a filter on taxonomy term and specify all the terms you want to draw from.
On Wednesday 20 June 2007 20:42:38 will hall wrote:
hi there, thanks for your reply. i don't think we are using views to accomplish the random image block at the moment:
http://www.theicarusproject.net/
i'm not even sure where the random image block got in there...
You're probably using the one that comes with the image module. You can do the same thing and have a little more control over it by using views. The other solution would be to hack the module to do what you want, but then you would be setting yourself up for some big headaches when you upgraded to 5.1.
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
Thanks for all who responded. I'd been struggling to my own site. (Just didn't expect to find the random piece in "sort order".... Makes perfect sense now.)
Interesting. Not sure this last step is necessary. I'm gussing it is probably done to circomvent the loading of the "Block Title" and isn't normally necccesary.
Meaning that you should be able to just enable this block and place it in a region in your theme.
I'm starting work on a module to take this to the next level.... Timed updates of the block content using Jquery and Ajax :).
Dave
------------------------- <?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 -- [ Drupal support list | http://lists.drupal.org/ ]
ok this is helpful all, thanks. so it looks like i need to dis-enable the existing block and use Views to create a new bloc and enable that.
newbie appreciating the help...
-- will
Metzler, David wrote:
Thanks for all who responded. I'd been struggling to my own site. (Just didn't expect to find the random piece in "sort order".... Makes perfect sense now.)
Interesting. Not sure this last step is necessary. I'm gussing it is probably done to circomvent the loading of the "Block Title" and isn't normally necccesary.
Meaning that you should be able to just enable this block and place it in a region in your theme.
I'm starting work on a module to take this to the next level.... Timed updates of the block content using Jquery and Ajax :).
Dave
<?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
[ Drupal support list | http://lists.drupal.org/ ]