本文整理汇总了PHP中cmsFramework::setPathway方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsFramework::setPathway方法的具体用法?PHP cmsFramework::setPathway怎么用?PHP cmsFramework::setPathway使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsFramework
的用法示例。
在下文中一共展示了cmsFramework::setPathway方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onPrepareContent
function onPrepareContent(&$article, &$params)
{
if (!class_exists('cmsFramework')) {
return;
}
// Check whether to perform the replacement or not
$option = Sanitize::getString($_REQUEST, 'option', '');
$view = Sanitize::getString($_REQUEST, 'view', '');
$layout = Sanitize::getString($_REQUEST, 'layout', '');
$id = Sanitize::getInt($_REQUEST, 'id');
if ($option == 'com_content' && in_array($view, array('article', 'category', 'section', 'frontpage')) && ($layout != '' || in_array($view, array('article', 'frontpage')))) {
$row =& $article;
if ((isset($row->params) || isset($row->parameters)) && isset($row->id) && isset($row->catid) && isset($row->sectionid) && $row->id > 0 && $row->catid > 0 && $row->sectionid > 0) {
$Dispatcher = new S2Dispatcher('jreviews', true);
if ($option == 'com_content' && $view == 'article' & $id > 0) {
$_GET['url'] = 'com_content/com_content_view';
} elseif ($option == 'com_content' && (($layout == 'blog' || $layout == 'blogfull') && ($view == 'category' || $view == 'section') || $view == 'frontpage')) {
$_GET['url'] = 'com_content/com_content_blog';
}
$passedArgs = array('params' => $params, 'row' => $row, 'component' => 'com_content');
$passedArgs['cat'] = $row->catid;
$passedArgs['section'] = $row->sectionid;
$passedArgs['listing_id'] = $row->id;
$output = $Dispatcher->dispatch($passedArgs);
if ($output) {
$row =& $output['row'];
$params =& $output['params'];
}
/**
* Store a copy of the $listing and $crumbs arrays in memory for use in the onBeforeDisplayContent method
*/
$_this =& cmsFramework::getInstance();
$_this->listing =& $output['listing'];
$_this->crumbs =& $output['crumbs'];
// Destroy pathway
if (isset($_this->crumbs) && !empty($_this->crumbs)) {
cmsFramework::setPathway(array());
}
unset($Dispatcher);
}
}
}