views:

345

answers:

2

I keep running into the same problem, and I feel like I'm solving it the clunky way. Do you have a better solution?

I have a site that with the content type "Staff Bios". I've created a view page that lists all the bios in alphabetical order. I want to have a block that shows just one bio (like a sidebar teaser), and I want the choice of which bio is displayed to be random.

I have been creating 2 separate views, one page with sort = node>title, and one block with sort = random. But that seems lame.

Thoughts? Thanks!

+2  A: 

No, this is not possible[*] with Drupal 5 / Views 1.

With Drupal 6 / Views 2, you get the option to create multiple View "Displays", each of which can have customized sorting (among other things).

[*] Well, technically, you /could/ do it, by creating a module that implements a new "View Type" that randomizes the rows before displaying them (and select that for the Block, and the normal View Type for the page), but I encourage you to instead put the effort into upgrading your site to Drupal 6.

smokris
A: 

Hhmph. Well, at least the clunky way works. Thanks for the confirmation. Someday I will have to make The Big Leap to d6... :)