Просмотр исходного кода

Ticket #4148 - Build-in API support: Add Content menu.

AntonLV 3 лет назад
Родитель
Сommit
d8df20c729
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      template/scripts/BxBasePage.php

+ 4 - 0
template/scripts/BxBasePage.php

@@ -414,6 +414,7 @@ class BxBasePage extends BxDolPage
             'menu_top' => '',
             'menu' => '',
             'menu_bottom' => '',
+            'menu_add' => '',
             'elements' => $this->getPageBlocksAPI($aBlocks),
         ];
         
@@ -456,6 +457,9 @@ class BxBasePage extends BxDolPage
         }
 
         if (isLogged()) {
+            if(($oMenuAddContent = BxDolMenu::getObjectInstance('sys_add_content')) !== false)
+                $a['menu_add'] = $oMenuAddContent->getCodeAPI();
+
             $o = BxDolProfile::getInstance();
             $a['user'] = [
                 'id' => $o->id(),