If the document is published, do you see those things in the front end?
Yes, of course.
In backend and if doc is unpublished TVs are shown if I call them directly via
This is a short snippet to put a text area if text is available:
<?php
$id= (isset($id))? $id : $modx->documentIdentifier;
$tvrt = $modx->getTemplateVar('reiseText',"*",$id);
$tvrth = $modx->getTemplateVar('reiseTextHead',"*",$id);
if ($tvrt['value'] != '') {
$output ='<div class="infoblock">';
if ($tvrth['value'] != '') { $output .= '<h2>'.$tvrth['value'].'</h2>'; } else { $output .= '<h2>[*pagetitle*]</h2>'; }
$output .= $tvrt['value'].'</div>';
return $output;
}
?>
This isn’t visible in preview if document is unpublished.