The random block in G2 displays an excerpt from a random definition, and a link to the complete definition.

I'd like to have the link to the random definition, but with a fixed text.

[transferred here from the G2 wiki]

Comments

fgm’s picture

Status: Active » Fixed

For this you'll have to create a small custom block and use the same "hidden" _g2_random G2 function used by the predefined "random word" block to obtain the data from which it creates its block.

Go to "Administer/Blocks/Add" (path: /admin/block/add), and create a block like this one:

$o = _g2_random();
$output = '<p>' 
  . l('A random definition taken from the G2 glossary', "node/$o->nid") 
  . '</p>';
return $output;

That's it ! Constant text for a random G2 entry. Click to your heart's content.

fgm’s picture

Additional solution: starting with today's version (2005-12-28) you could also write a theme function to overload the default theme_g2_block_wotd and use basically the same code as described previously.

Anonymous’s picture

Status: Fixed » Closed (fixed)