Content last modified Saturday 21 March 2020
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


Random Text grabs a random text string from either a database table or a text file. This could be useful for all sort of things from a quote-of-the-day to a random site strap line, to anything really.

To randomize from file, you simply upload a text file to your site containing the items to be picked from. You can specify your own delimiter, but the default is one item per line (omit the delimiter attribute for one-per-line). Set the source to “file” and the path to the full path to your file.

<txp:dru_random_text source="file" path="/path/to/text/file" delimiter="|" />

To randomize from a database table, the plugin picks a named column from a random row in a named table. The table needs to be in the same database that TXP is using. You specify table and column attributes, and set the source attribute to “database”.

<txp:dru_random_text source="database" table="textpattern" column="Title" />
Article Request Count:
Initially released:
April 2004
Posted here:
22 Feb 2005

You know you want to visit the Archives.
Published with Textpattern