<div data-interchange="[[[*TVname]], small], [[[*TVname]], medium]"></div>
// get the TV name
$tv = $modx->getOption('tv', $scriptProperties, '');
// get the TV value of the current resource
$value = $modx->resource->getTVValue($tv);
$output = '<div data-interchange="[' . $value . ', small], [' . $value . ', medium]"></div>';
return $output;
[[geTVValue? &tv=`TVname`]]
<div data-interchange="\[[[*TVname]], small\], \[[[*TVname]], medium\]"></div>
<div data-interchange="[ [[*TVname]], small], [ [[*TVname]], medium]"></div>