Hi,
I'm taking part in the GHOP Contest (http://drupal.org/node/195913) and as part of my task (Improve documentation on arguments: http://drupal.org/node/201529) I need to find some sample uses of arguments in Views.

So, I'm appealing to the Drupal Community to post your innovative and interesting uses of arguments in views - from the simple to the complex, anything goes!

Thanks for your help!

Comments

zirvap’s picture

I've described one here http://drupal.org/node/161867. (I have no link to a demo because the view is visible only to the organizers of the convention.)

Another use is for the programme for the game convention (site is in Norwegian, except that almost all the games we play have English names :-). I wanted to show all games in a table, with time slots along one axis, and type of game along the other.

I did this by making a view for each type of game (type is a vocabulary), and use time slot (which are terms in another vocabulary) as an argument. Each view was a list of game titles with links to the game nodes.

I then made a node with a table (using plain HTML), and the contributed module Insert View, and put the views with arguments into the table. The table part of the programme looks like this:

<table>
<tr class="odd"><td>&nbsp;</td>
<th><a href="?q=taxonomy/term/8">Brett- og kortspill</a></th>
<th><a href="?q=taxonomy/term/9">Rollespill</a></th>
<th><a href="?q=taxonomy/term/10">Miniatyrspill</a></th>
<th><a href="?q=taxonomy/term/11">Andre arrangementer</a></th>
</tr>

<tr class="even"><th>Pulje 1: Fredag <br> kl. 18-23</th> <td>[view:brettspill==2]</td><td>[view:rollespill==2]</td><td>[view:miniatyrspill==2]</td><td>[view:andrearr==2]</td></tr>

<tr class="odd"><th>Pulje 2: Lørdag <br> kl. 00-05</th> <td>[view:brettspill==3]</td><td>[view:rollespill==3]</td><td>[view:miniatyrspill==3]</td><td>[view:andrearr==3]</td></tr>

<tr class="even"><th>Pulje 3: Lørdag <br> kl. 9-13.30</th> <td>[view:brettspill==4]</td><td>[view:rollespill==4]</td><td>[view:miniatyrspill==4]</td><td>[view:andrearr==4]</td></tr>

<tr class="odd"><th>Pulje 4: Lørdag <br> kl. 14-19</th> <td>[view:brettspill==5]</td><td>[view:rollespill==5]</td><td>[view:miniatyrspill==5]</td><td>[view:andrearr==5]</td></tr>

<tr class="even"><th>Lørdag <br> kl. 19.30</th> 
<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>[view:andrearr==15]</td></tr>

<tr class="odd"><th>Pulje 5: Lørdag <br> kl. 22-05</th> <td>[view:brettspill==6]</td><td>[view:rollespill==6]</td><td>[view:miniatyrspill==6]</td><td>[view:andrearr==6]</td></tr>

<tr class="even"><th>Pulje 6: Søndag <br> kl. 10-14</th> <td>[view:brettspill==7]</td><td>[view:rollespill==7]</td><td>[view:miniatyrspill==7]</td><td>[view:andrearr==7]</td></tr>

<tr class="odd"><th>Annet tidspunkt</th> <td>[view:brettspill==1]</td><td>[view:rollespill==1]</td><td>[view:miniatyrspill==1]</td><td>[view:andrearr==1]</td></tr>
</table>

This would, of course, have been more elegant if I had figured out how to make a view with two arguments (is that possible?), but for my use it worked very well.

-------------------------------------------------------------------------

Brief Norwegian/English dictionary to make the programme more understandable:
- Brett- og kortspill: Board and card games
- Rollespill: Roleplaying games
- Miniatyrspill: Miniature wargames
- Andre arrangementer: Other events

- Pulje: Time slot
- Fredag: Friday
- Lørdag: Saturday
- Søndag: Sunday