mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
move contentid of cis4 menu root to ci config, remove unused controller components CisVue, modify CISVUE-Header to use config for cis4 menu root content id
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
// CMS Content Id for CIS4 Menu Root
|
||||
$config['cis_menu_root_content_id'] = 11066;
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class CisVue extends Auth_Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'Menu' => [self::PERM_LOGGED]
|
||||
]);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
*/
|
||||
public function Menu()
|
||||
{
|
||||
$this->load->model('content/Content_model', 'ContentModel');
|
||||
$menu_contentID = $this->ContentModel->getMenuContentID();
|
||||
$result = $this->ContentModel->getMenu($menu_contentID, getAuthUID());
|
||||
$menu = getData($result) ?? (object)['childs' => []];
|
||||
|
||||
$this->outputJsonSuccess($menu);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,8 @@ $this->load->view('templates/FHC-Header', $includesArray);
|
||||
if (!isset($menu)) {
|
||||
$ci =& get_instance(); // get CI instance
|
||||
$ci->load->model('content/Content_model', 'ContentModel');
|
||||
$cis4_content_id = $ci->ContentModel->getMenuContentID();
|
||||
$ci->load->config('cis');
|
||||
$cis4_content_id = $ci->config->item('cis_menu_root_content_id');
|
||||
$result = $ci->ContentModel->getMenu($cis4_content_id, getAuthUID());
|
||||
$menu = getData($result)->childs ?? [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user