Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Drupal Views: how to display random nodes/content

    4th May 2009

    Today I had a task of displaying random node in a Views-generated sidebar block.

    This is how to do that in Drupal 7 (Views 3):

    1. edit the view which makes the block available (follow http://your.site/admin/build/views/viewname/edit)
    2. in the Sort Criteria section (under Filter), look for and add Global:Random.

    This is how to do that in Drupal 6 (Views 2):

    1. edit the view which makes the block available (follow http://your.site/admin/build/views/viewname/edit)
    2. in the Sort Criteria section, add the Random criteria.

    It can’t be simpler than that.

    Share

    Posted in Drupal, Notepad, Software | 13 Comments »

    Iceweasel/Firefox 3: how to work-around random/erratic right-click action

    19th July 2008

    Update: as of FireFox/IceWeasel 3.0.14, this bug appears to be fixed.

    When right-clicking many links in FF3/IW3, it quite often happens so that a random action is performed instead of opening the context menu (bug report).

    One of the solutions work-arounds (suggested by Andre Pirard) is to slow-right-click, that is to hold the right mouse button down until the menu actually appears, then – and only then – release it. Or, you can even slow-right-click, move the pointer over the desired menu item, and then release – that will perform the desired action in a single long right click (instead of more common single right click with a following single left click.)

    Alternative workaround (found at the bug report page): install the mouse gestures add-on, and restart firefox. Tested: works for me.

    This bug/behaviour is otherwise unsolved.

    Share

    Posted in Misc, Web | 8 Comments »