Actually, I don’t think so. What you’ll get from that function is an array of TV elements. One of these is "value".
You might be looking for getTemplateVarOutput, which returns the value(s) entered into a TV, e.g.:
$size=$modx->getTemplateVarOutput('itemSize',$modx->documentIdentifier);
However, there is an issue with the output of this function in 0.9.2.1. It works, but if your TV is a multi-listbox or checkboxes or anything that can hold multiple values they will all be returned in one string with no separator to help you to split them up. This is supposed to be fixed in 0.9.5, but I haven’t tried it there yet myself.
In that case, I fall back to regular SQL queries, e.g.:
$whichTV=5; // ID for size TV
$sql="SELECT * FROM modx_site_tmplvar_contentvalues WHERE tmplvarid='".$whichTV."' AND contentid ='".$modx->documentIdentifier."'";
$result=$modx->dbQuery($sql);
$allvalues=$modx->fetchRow($result);
$values=explode('||',$allvalues['value']);
foreach($values as $value){
$output.='<option value="'.$value.'">'.$value.'</option>';
}
It’s not pretty, but it works...
If however this function is now working as expected in 0.9.5, that’s one more reason to upgrade!
I definitely think that the documentation could explain how these API functions work better than it does now (and a couple of examples wouldn’t hurt).