require_once '/home/projects/public_html/config.core.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
$modx = new modX();
$modx->initialize('web');
$modx->getService('error','error.modError');
$html= $modx->runSnippet('Wayfinder', array('startId' => '1', 'level'=>'0'));
echo $html;
// Set $embedded to true and specify the header and footer functions if the survey is to be displayed embedded in a CMS $embedded = true; $embedded_inc = "http://www.example.com/index.php?id=62"; // path to the header to include if any $embedded_headerfunc = ""; // e.g. COM_siteHeader for geeklog $embedded_footerfunc = ""; // e.g. COM_siteFooter for geeklog
This question has been answered by multiple community members. See the first response.
global $modx;
require_once '/home/projects/public_html/config.core.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
$modx = new modX();
$modx->initialize('web');
$modx->getService('error','error.modError');
$html = $modx->getChunk('header');
$html .= $modx->runSnippet('Wayfinder', array('id' => $modx->resource->get('id'), 'startId'=>'1', "level"=>'0'));
$psnavigation = $html;
$coreReplacements['PSNAVIGATION'] = $psnavigation;Fatal error: Call to a member function get() on a non-object in /home/projects/public_html/surveys/replacements.php on line 48
$html .= $modx->runSnippet('Wayfinder', array('id' => $modx->resource->get('id'), 'startId'=>1, "level"=>0));
Fatal error: Call to a member function get() on a non-object in /home/projects/public_html/core/components/wayfinder/wayfinder.class.php on line 40
$html .= $modx->runSnippet('Wayfinder', array('id' => $modx->getOption('site_start'), 'startId'=>'1', "level"=>'1'));
$modx->resource = $modx->getObject('modResource',$modx->getOption('site_start'));Fatal error: Call to a member function get() on a non-object in /home/projects/public_html/core/components/wayfinder/wayfinder.class.php on line 160
$cacheKey = 'wf-'.$this->modx->user->get('id').'-'.base64_encode(serialize($this->_config));
$userID = $modx->getLoginUserID(); $cacheKey = $userID;