I use modx and, to be honest, I am new to this CMS. I want to show corresponding Template Variable's value on each page. Here is my code written in the snippet:
<?php
if ( isset($modx->documentObject['PDF-Resource-Url'][1]) && !empty($modx->documentObject['PDF-Resource-Url'][1]) ) {
echo '<li class="related-link slide expanded"><a href="' . $modx->documentObject['PDF-Resource-Url'][1] . '" target="_blank">Pdf</a></li>';
}
?>
But it returns empty output. I use the latest version of modx revolution. I think that maybe this is the reason why I see empty output.
Thanks for helping!