Using
$modx->getPageInfo($ID,1,'pagetitle');
in my snippet, the error occurred such as "Fatal error: Call to undefined method modX::getPageInfo() in /virtua......../".
I want to get the pagetitle of $ID, what API function should I use ?
-
☆ A M B ☆
- 3,141 Posts
Using Evo (1.0) or Revo (2.0)?
It looks to me like you're on Revo, and getPageInfo is from Evo.
To get the pagetitle of $ID, you should use something like this:
$resource = $modx->getObject('modResource',$ID);
return $resource->get('pagetitle');
Thank u very much !
It can use.
(I use MODX Revo)