本文整理匯總了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);
}