Hello,
I want to write a little snippet and need some help. This snippet - you may call it LinkToThis - will read IDs of documents written in a TV and build a list of links. Sure, the is
Related snippet but this relies on Ditto and thats why I didn´t get it running on a single document. And you cant´t change the order of the linked documents individually when the sorting rule is set.
Here is the code with my question problem included
$output = '<ul>';
$vars = $modx->getTemplateVarOutput('verweis', $modx->documentIdentifier,'1');
$vary = explode(",",$vars['verweis']);
for($n=0;$n<sizeof($vary);$n++) {
$output .= '<li><a href="'.$modx->makeUrl($vary[$n]).'">how-do-i-get-the-pagetitle-of-the-linked-document?</a></li>';
}
$output.= '</ul>';
return $output;
So how can I get the titles of the linked document? Any help would be appreciated. And of course I will publish the completed snippet.
Mazso