Yes. Modify this line:
$contentRow = $modx->getPageInfo($randomDocId,1,'content');
The last argument can be a comma-separated list (all enclosed in the ’ ’); it will return an associative array of all the items you request in the argument.
$contentRow = $modx->getPageInfo($randomDocId,1,'content, introtext');
In this case, we should probably have the entire layout of the returned results generated by the snippet; this way you will have the necessary containers for positioning the various parts.
// snippet RandomDoc
// returns content from a random document
// from a given folder
// usage [!RandomDoc?folder=`xxx`!]
// if $folder is not set, uses current doc ID as folder
$folder = isset($folder)?$folder:$modx->documentIdentifier;
$docs = $modx->getActiveChildren($folder);
// get a random document id
$rnd = rand(1, count($docs));
$rnd -=1; // because we need to start at 0 in the array
$randomDocId = $docs[$rnd]['id'];
// get the content of the random doc
$contentRow = $modx->getPageInfo($randomDocId,1,'content, introtext');
$ret = '<div id="content">'.$contentRow['content'].'</div>';
$ret .= '<div id="introtext">'.$contentRow['introtext'].'</div>';
return $ret;
(thinking rude thoughts about whatever genius called this field "introtext" in the database, but "summary" in the document settings form >:( )