active Menu Entry logic for CISVUE

This commit is contained in:
SimonGschnell
2024-09-24 14:57:41 +02:00
parent 470192aabd
commit 7ed7ce1bb9
6 changed files with 159 additions and 46 deletions
+14 -6
View File
@@ -40,13 +40,21 @@ class Cms extends FHC_Controller
*/
public function content($content_id, $version = null, $sprache = null, $sichtbar = true)
{
$content = $this->ContentModel->load($content_id);
$content = $this->getDataOrTerminateWithError($content);
// return early if the content_id for the content is missing
if (!isset($content_id))
$this->terminateWithError("content_id is missing");
$content = $this->ContentModel->load($content_id);
if (isError($content))
$this->terminateWithError(getError($content));
$content = getData($content);
if (NULL === $content)
$this->terminateWithError("Content not found");
$content = current($content);
$this->load->view('CisVue/Cms/Content', ['content_id' => $content_id, 'template_kurzbz'=>$content->template_kurzbz , 'version' => $version, 'sprache' => $sprache, 'sichtbar' => $sichtbar]);
$this->load->view('CisVue/Cms/Content', ['content_id' => $content_id, 'template_kurzbz' => $content->template_kurzbz, 'version' => $version, 'sprache' => $sprache, 'sichtbar' => $sichtbar]);
}
/**
@@ -62,7 +70,7 @@ class Cms extends FHC_Controller
*/
public function news($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
{
$this->load->view('CisHtml/Cms/Content', ['infoscreen' => $infoscreen, 'studiengang_kz' => $studiengang_kz, 'semester' => $semester, 'mischen' => $mischen, 'titel' => $titel, 'edit' => $edit, 'sichtbar' => $sichtbar]);
$this->load->view('CisVue/Cms/Content', ['infoscreen' => $infoscreen, 'studiengang_kz' => $studiengang_kz, 'semester' => $semester, 'mischen' => $mischen, 'titel' => $titel, 'edit' => $edit, 'sichtbar' => $sichtbar]);
}
public function getNews($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
+2 -2
View File
@@ -8,11 +8,11 @@ $includesArray = array(
);
$this->load->view('templates/CISHTML-Header', $includesArray);
$this->load->view('templates/CISVUE-Header', $includesArray);
?>
<div id="content" >
</div>
<?php $this->load->view('templates/CISHTML-Footer', $includesArray); ?>
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
+24 -8
View File
@@ -18,10 +18,18 @@ $sitesettings = array(
)
);
$this->load->view(
'templates/CISHTML-Header',
$sitesettings
);
if(defined('CIS4')){
$this->load->view(
'templates/CISVUE-Header',
$sitesettings
);
}else{
$this->load->view(
'templates/FHC-Header',
$sitesettings
);
}
?>
<div id="wrapper">
@@ -49,7 +57,15 @@ $this->load->view(
</div>
<?php
$this->load->view(
'templates/CISHTML-Footer',
$sitesettings
);
if (defined('CIS4')) {
$this->load->view(
'templates/CISVUE-Footer',
$sitesettings
);
} else {
$this->load->view(
'templates/FHC-Footer',
$sitesettings
);
}
@@ -18,7 +18,7 @@ $sitesettings = array(
);
$this->load->view(
'templates/CISHTML-Header',
'templates/CISVUE-Header',
$sitesettings
);
?>
@@ -222,6 +222,6 @@ $this->load->view(
<?php
$this->load->view(
'templates/CISHTML-Footer',
'templates/CISVUE-Footer',
$sitesettings
);