mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
rendering content pages
This commit is contained in:
@@ -72,8 +72,18 @@ class Cms extends Auth_Controller
|
||||
// return early if the content_id for the content is missing
|
||||
if(!isset($content_id))
|
||||
$this->terminateWithError("content_id is missing");
|
||||
|
||||
$this->load->view('CisHtml/Cms/Content', ['content_id' => $content_id, 'version' => $version, 'sprache' => $sprache, 'sichtbar' => $sichtbar]);
|
||||
|
||||
$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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,8 +48,18 @@ class Cms extends FHC_Controller
|
||||
// return early if the content_id for the content is missing
|
||||
if(!isset($content_id))
|
||||
$this->terminateWithError("content_id is missing");
|
||||
|
||||
$this->load->view('CisHtml/Cms/Content', ['content_id' => $content_id, 'version' => $version, 'sprache' => $sprache, 'sichtbar' => $sichtbar]);
|
||||
|
||||
$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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,9 @@ class Cms extends FHC_Controller
|
||||
$this->loadPhrases([
|
||||
'global'
|
||||
]);
|
||||
|
||||
$this->load->model('content/Content_model', 'ContentModel');
|
||||
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -42,8 +45,18 @@ class Cms extends FHC_Controller
|
||||
// return early if the content_id for the content is missing
|
||||
if(!isset($content_id))
|
||||
$this->terminateWithError("content_id is missing");
|
||||
|
||||
$this->load->view('CisHtml/Cms/Content', ['content_id' => $content_id, 'version' => $version, 'sprache' => $sprache, 'sichtbar' => $sichtbar]);
|
||||
|
||||
$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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -110,10 +110,14 @@ class CmsLib
|
||||
$processor = new XSLTProcessor();
|
||||
$processor->importStylesheet($xsltemplate);
|
||||
|
||||
$content = $processor->transformToXML($XML);
|
||||
$content = str_replace('dms.php', APP_ROOT . 'cms/dms.php', $content);
|
||||
|
||||
$transformed_content = $processor->transformToXML($XML);
|
||||
$transformed_content = str_replace('dms.php', APP_ROOT . 'cms/dms.php', $transformed_content);
|
||||
|
||||
return success($content);
|
||||
return success([
|
||||
"type"=>$content->template_kurzbz,
|
||||
"content"=>$transformed_content
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'title' => 'FH-Complete',
|
||||
'customJSModules' => ['public/js/apps/Cis/Cms.js'],
|
||||
'primevue3'=>true,
|
||||
'customCSSs' => [
|
||||
'public/css/Cis4/Cms.css',
|
||||
#'skin/style.css.php'
|
||||
]
|
||||
);
|
||||
|
||||
$this->load->view('templates/FHC-Header', $includesArray);
|
||||
switch($template_kurzbz){
|
||||
case 'raum_contentmittitel':
|
||||
$includesArray['tabulator5'] = true;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div id="cms">
|
||||
|
||||
<?php echo (isset($content_id) ? '<cms-content :content_id="'.$content_id.'" :version="'.$version.'" :sprache="'.$sprache.'" :sichtbar="'.$sichtbar.'" />' : '<cms-news/>'); ?>
|
||||
|
||||
</div>
|
||||
<?php $this->load->view('templates/FHC-Footer', $includesArray); ?>
|
||||
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
|
||||
|
||||
@@ -1,20 +1,29 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'primevue3' => true,
|
||||
'customJSModules' => ['public/js/apps/Cis/Cms.js'],
|
||||
'primevue3'=>true,
|
||||
'customCSSs' => [
|
||||
'public/css/Cis4/Cms.css',
|
||||
#'skin/style.css.php'
|
||||
]
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISHTML-Header', $includesArray);
|
||||
switch($template_kurzbz){
|
||||
case 'raum_contentmittitel':
|
||||
$includesArray['tabulator5'] = true;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div id="cms">
|
||||
|
||||
<?php echo (isset($content_id) ? '<cms-content :content_id="'.$content_id.'" :version="'.$version.'" :sprache="'.$sprache.'" :sichtbar="'.$sichtbar.'" />' : '<cms-news/>'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/CISHTML-Footer', $includesArray); ?>
|
||||
<?php $this->load->view('templates/CISVUE-Footer', $includesArray); ?>
|
||||
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
<?php
|
||||
$includesArray = array(
|
||||
'customJSModules' => ['public/js/apps/Cis/Cms.js'],
|
||||
'primevue3'=>true,
|
||||
'customCSSs' => [
|
||||
'public/css/Cis4/Cms.css',
|
||||
#'skin/style.css.php'
|
||||
]
|
||||
);
|
||||
|
||||
switch($template_kurzbz){
|
||||
case 'raum_contentmittitel':
|
||||
$includesArray['tabulator5'] = true;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->load->view('templates/CISVUE-Header', $includesArray);
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<div id="cms">
|
||||
|
||||
<?php echo (isset($content_id) ? '<cms-content :content_id="'.$content_id.'" :version="'.$version.'" :sprache="'.$sprache.'" :sichtbar="'.$sichtbar.'" />' : '<cms-news/>'); ?>
|
||||
|
||||
Reference in New Issue
Block a user