Hello
About 3 years ago I had some help putting this snippet together for MODx 95:
<?php
$page = $modx->documentObject[’id’];
$parent = $modx->getParent($page,1,’id’);
$plt = $modx->getParent($page,1,’longtitle’);
$modx->setPlaceholder(’parentTitle’, $plt[’longtitle’]);
$url = $modx->makeURL($parent[’id’]);
return $url;
?>
I have tried using it in .963 and I get the following error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« `` is not numeric and may not be passed to makeUrl() »
It works fine in .95 but not in .962-.963
The name of the snippet is [!PageParent!]. The purpose is to fetch the url of the parent doc along with the longtitle of the parent doc. Below is how I use it:
<a href="[!PageParent!]/" title="[+parentTitle+]" >[+parentTitle+]</a>
Can anyone see why it is now breaking in .963?