本文整理汇总了PHP中CIBlockParameters::GetPathTemplateMenuItems方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockParameters::GetPathTemplateMenuItems方法的具体用法?PHP CIBlockParameters::GetPathTemplateMenuItems怎么用?PHP CIBlockParameters::GetPathTemplateMenuItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlockParameters
的用法示例。
在下文中一共展示了CIBlockParameters::GetPathTemplateMenuItems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (CIBlockRights::UserHasRightTo($ID, $ID, "iblock_edit")) {
$aMenu = array(array("TEXT" => GetMessage("IBLOCK_BACK_TO_ADMIN"), "LINK" => '/bitrix/admin/iblock_admin.php?lang=' . $lang . '&type=' . urlencode($type) . '&admin=' . ($_REQUEST["admin"] == "Y" ? "Y" : "N"), "ICON" => "btn_list"));
$context = new CAdminContextMenu($aMenu);
$context->Show();
$u = new CAdminPopupEx("mnu_LIST_PAGE_URL", CIBlockParameters::GetPathTemplateMenuItems("LIST", "__SetUrlVar", "mnu_LIST_PAGE_URL", "LIST_PAGE_URL"), array("zIndex" => 2000));
$u->Show();
$u = new CAdminPopupEx("mnu_SECTION_PAGE_URL", CIBlockParameters::GetPathTemplateMenuItems("SECTION", "__SetUrlVar", "mnu_SECTION_PAGE_URL", "SECTION_PAGE_URL"), array("zIndex" => 2000));
$u->Show();
$arItems = CIBlockParameters::GetPathTemplateMenuItems("DETAIL", "__SetUrlVar", "mnu_DETAIL_PAGE_URL", "DETAIL_PAGE_URL");
if ($str_CATALOG_TYPE == 'O') {
$arItems[] = array("SEPARATOR" => true);
$arItems[] = array("TEXT" => GetMessage("IB_E_URL_PRODUCT_ID"), "TITLE" => "#PRODUCT_URL# - " . GetMessage("IB_E_URL_PRODUCT_ID"), "ONCLICK" => "__SetUrlVar('#PRODUCT_URL#', 'mnu_DETAIL_PAGE_URL', 'DETAIL_PAGE_URL')");
}
$u = new CAdminPopupEx("mnu_DETAIL_PAGE_URL", $arItems, array("zIndex" => 2000));
$u->Show();
$arItems = CIBlockParameters::GetPathTemplateMenuItems("DETAIL", "__SetUrlVar", "mnu_CANONICAL_PAGE_URL", "CANONICAL_PAGE_URL");
array_unshift($arItems, array("SEPARATOR" => true));
array_unshift($arItems, array("TEXT" => "https://", "TITLE" => "", "ONCLICK" => "__SetUrlVar('https://', 'mnu_CANONICAL_PAGE_URL', 'CANONICAL_PAGE_URL')"));
array_unshift($arItems, array("TEXT" => "http://", "TITLE" => "", "ONCLICK" => "__SetUrlVar('http://', 'mnu_CANONICAL_PAGE_URL', 'CANONICAL_PAGE_URL')"));
$u = new CAdminPopupEx("mnu_CANONICAL_PAGE_URL", $arItems, array("zIndex" => 2000));
$u->Show();
?>
<script>
var InheritedPropertiesTemplates = new JCInheritedPropertiesTemplates(
'frm',
'/bitrix/admin/iblock_templates.ajax.php?ENTITY_TYPE=B&ENTITY_ID=<?php
echo intval($ID);
?>
'
);
BX.ready(function(){
示例2: GetPathTemplateParam
public static function GetPathTemplateParam($menuType, $ID, $parameterName, $defaultValue = "", $parentID = "URL_TEMPLATES")
{
return array(
"PARENT" => $parentID,
"NAME" => $parameterName,
"TYPE" => "CUSTOM",
"DEFAULT" => $defaultValue,
"JS_FILE" => FX_ROOT."/js/iblock/path_templates.js",
"JS_EVENT" => "IBlockComponentProperties",
"JS_DATA" => str_replace("\n", "", CUtil::PhpToJSObject(array(
"mnu_".$ID, //menu div ID
5000, //zIndex
CIBlockParameters::GetPathTemplateMenuItems($menuType, "window.IBlockComponentPropertiesObj.Action", "mnu_".$ID), //Menu items
))),
);
}