can you post the snippet here?
<?php /* -------------------------------------------------- randomTag [[randomTag? &docid=`` &tvtag=`` &delimiter=``]] -------------------------------------------------- Parameters -------------------------------------------------- */ # $docid [ int ] # ID of the document for which to get a template variable content. # Default: current document $rtIntDocId = (isset($docId)) ? $docid : $modx->documentIdentifier; # $tvtag [ string ] # Name of the field where the tags are located. # Default: 'null' $rtStrDocField = (isset($tvtag)) ? trim($tvtag) : 'null'; # $delimiter [ string ] # The delimiter that seporates the tags in the template variable. # Default: ", " $rtBoolDelimiter = (isset($delimiter)) ? $delimiter : ', '; /* Do not edit the code below! ----------------------------------------------- */ # get content of the field $output = $modx->getTemplateVarOutput($rtStrDocField,$rtIntDocId); $field = $output[$rtStrDocField]; # break out tags from field $rtSplit = split($rtBoolDelimiter, $field); # count number of tags $rtSplitNumber = count($rtSplit); # select random number and associate array $rtNum = rand(1, $rtSplitNumber); $rtNum = $rtNum - 1; # clear it unset($rtIntDocId, $rtStrDocField, $rtBoolDelimiter); return $rtSplit[$rtNum]; ?>

[!Ditto? &filter=`tvpage_tags,[[randomTag]],2` &display=`3` &tpl=`ditto_related_items` !]
OK, I have a basic question about using this in my page: Um, how do I use this in my page? Obviously, I’m working my up the learning curve.
Here’s my Ditto call:but this isn’t allowing [[randomTag]] to run (so it seems). I tried running [[randomTag]] before the Ditto call, but that just put the tag name on the page. How should I pass that value to the Ditto call?[!Ditto? &filter=`tvpage_tags,[[randomTag]],2` &display=`3` &tpl=`ditto_related_items` !]
[!Ditto? &filter=`[[randomTag? &tvtag=`vpage_tags`]],2` &display=`3` &tpl=`ditto_related_items` !]