本文整理汇总了PHP中KTTemplating::renderTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP KTTemplating::renderTemplate方法的具体用法?PHP KTTemplating::renderTemplate怎么用?PHP KTTemplating::renderTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KTTemplating
的用法示例。
在下文中一共展示了KTTemplating::renderTemplate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_main
function do_main()
{
$sCode = KTUtil::arrayGet($_REQUEST, 'code');
$sName = KTUtil::arrayGet($_REQUEST, 'varname', 'fFolderId');
$oWidget = unserialize($_SESSION['collection_widgets'][$sCode]);
$oCollection = $oWidget->getCollection();
$oFolder = Folder::get(KTUtil::arrayGet($_REQUEST, 'fFolderId', 1));
if (PEAR::isError($oFolder)) {
$this->errorRedirectToMain(_kt('Invalid folder selected.'));
exit(0);
}
$aOptions = array('ignorepermissions' => KTBrowseUtil::inAdminMode($this->oUser, $oFolder));
$oCollection->_queryObj->folder_id = $oFolder->getId();
$aOptions = $oCollection->getEnvironOptions();
$aOptions['return_url'] = KTUtil::addQueryString($_SERVER['PHP_SELF'], array('code' => $sCode, 'varname' => $sName, 'fFolderId' => $oFolder->getId()));
$oCollection->setOptions($aOptions);
// add the collection code to the title column QS params
foreach ($oWidget->aCols as $ns) {
$aColOpts = $oCollection->getColumnOptions($ns);
$aColOpts['qs_params'] = kt_array_merge(KTUtil::arrayGet($aColOpts, 'qs_params', array()), array('code' => $sCode, 'varname' => $sName));
$oCollection->setColumnOptions($ns, $aColOpts);
}
// make the breadcrumbs
$aBreadcrumbs = $this->_generate_breadcrumbs($oFolder, $sCode, $oWidget->aBCUrlParams, $sName);
print KTTemplating::renderTemplate('ktcore/forms/widgets/collection', array('collection' => $oCollection, 'folder' => $oFolder, 'breadcrumbs' => $aBreadcrumbs, 'targetname' => $sName));
exit(0);
}