tags:

views:

1014

answers:

2

im trying to create a block that shows a random image from a pool of 20 in a dedicated folder, inside /files/. the first step i guess is creating a view that outputs a block. but afaik its only possible to display cck fields in this block, and not make it read from a folder on the server?

if not, what's the best way to go about this?

Finally, Id like to show this block only on pages that belong to a certain taxonomy term. In the admin for this block I can enter PHP that should return TRUE on pages where the block is to be shown. I'm just wondering - are taxonomy terms available here?

+1  A: 

Best way is to make a small module for this.

The module will publish a block, and you will position this block wherever you wish on your pages. In the module's code, you will put the statements that will get the image and return a link to it. Only thing, if you are using caching you will need to do some extra work, because the cache will prevent the random behavior: you can either disable it, or force a cache cleanup before displaying.

Here is the guide to do this: http://drupal.org/developing/modules And here is specifically the task you need, the creation of blocks: http://drupal.org/node/206758

Palantir
A: 

Take a look at http://code.google.com/p/fpss-drupal/

This a module for the popular FrontPageSlideShow for Joomla. It has a few themes but easily customisable.

n002213f