document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /*
  2. ::::::::::::::::::::::::::::::::::::::::
  3.  Snippet name: IncudePage
  4.  Short Desc: Include a MODx page content
  5.  Version: 2.0
  6.  Author: James (james@mercstudio.com) - original idea from Daniel Gibbs (danielgibbs.net)
  7.  Date: 30th September 2012
  8. ::::::::::::::::::::::::::::::::::::::::
  9. Example Usage:
  10.     [[IncludePage? &pageID=`12`]]
  11. ::::::::::::::::::::::::::::::::::::::::
  12. */
  13.  
  14. if (!isset ($pageID))  {
  15.     return "<p>Error: No page ID specified, can\'t include content...</p>";
  16. }
  17. else {
  18.   $oRes = $modx->getObject("modResource", $pageID);
  19.   return $oRes->get("content");
  20. }
');