Subject says it all. I want to get an
inherited value of template variable.
Say, there is a TV named [*category*] which specifies document category. The field ’default value’ contains this definition:
When used in document, if not set to anything else, it returns ’general’. If set for the parent document to ’sports’ it returns ’sports’ in rendered document. However, when accessed with MODx API it returns:
<?php
$output = $modx->getTemplateVar('category',"*",$docid);
return $output['value']; // returns '@INHERIT general'
$output = $modx->getTemplateVarOutput('category',$docid);
return $output['category']; // returns 'general'
?>
The question is: how to get the
inherited value of template variable for the particular document? In this case it should return ’sports’.