mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Default Menu
This commit is contained in:
@@ -29,7 +29,7 @@ class CisVue extends Auth_Controller
|
||||
public function Menu()
|
||||
{
|
||||
$this->load->model('content/Content_model', 'ContentModel');
|
||||
$result = $this->ContentModel->getMenu(6739, get_uid());
|
||||
$result = $this->ContentModel->getMenu(defined('CIS4_MENU_ENTRY') ? CIS4_MENU_ENTRY : null, get_uid());
|
||||
$menu = getData($result) ?? (object)['childs' => []];
|
||||
|
||||
$this->outputJsonSuccess($menu);
|
||||
|
||||
@@ -72,6 +72,64 @@ class Content_model extends DB_Model
|
||||
*/
|
||||
public function getMenu($root_content_id, $uid, $sprache=DEFAULT_LANGUAGE)
|
||||
{
|
||||
if ($root_content_id === null) {
|
||||
$res = json_decode('{
|
||||
"content_id": 1000000,
|
||||
"template_kurzbz": "contentmittitel",
|
||||
"titel": "CIS4",
|
||||
"content": "<content></content>",
|
||||
"menu_open": true,
|
||||
"aktiv": true,
|
||||
"childs": [
|
||||
{
|
||||
"content_id": 1000001,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "News",
|
||||
"content": "<content><url><![CDATA[../cis.php/CisHtml/Cms/news]]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000002,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "COVID-19",
|
||||
"content": "<content><url><![CDATA[../cis.php/CisHtml/Cms/content/10012]]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000003,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Meine LV",
|
||||
"content": "<content><url><![CDATA[../cis.php/Cis/MyLv]]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000004,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Stundenplan",
|
||||
"content": "<content><url><![CDATA[../cis.php/Cis/Stundenplan]]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000005,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Dokumente",
|
||||
"content": "<content><url><![CDATA[../cis.php/Cis/Documents]]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
}
|
||||
]
|
||||
}');
|
||||
return success($res);
|
||||
}
|
||||
$sql = "
|
||||
SELECT
|
||||
c.content_id,
|
||||
|
||||
@@ -18,7 +18,7 @@ $this->load->view('templates/FHC-Header', $includesArray);
|
||||
if (!isset($menu)) {
|
||||
$ci =& get_instance(); // get CI instance
|
||||
$ci->load->model('content/Content_model', 'ContentModel');
|
||||
$result = $ci->ContentModel->getMenu(6739, get_uid());
|
||||
$result = $ci->ContentModel->getMenu(defined('CIS4_MENU_ENTRY') ? CIS4_MENU_ENTRY : null, get_uid());
|
||||
$menu = getData($result) ?? (object)['childs' => []];
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user