--- /dev/null
+#rightbar{
+ width:262px;
+ display:inline-block;
+}
+
+#rightbar>img{
+ display: block;
+ margin: 0 0 17px 0;
+}
+
+#rightbar>img,
+#rightbar>section{
+ border-radius: 5px;
+ border:1px solid #c7c5c5;
+ width:262px;
+ box-sizing: border-box;
+}
+
+#rightbar>section{
+ font-weight: 300;
+ font-size: 13px;
+ padding:0 20px;
+}
+
+#rightbar>section strong{
+ font-weight: 500;
+}
+
+#content>div#c{
+ width:443px;
+ display: inline-block;
+ margin:0 51px 0 0;
+}
\ No newline at end of file
*/
public function getCMSTemplates() {
$templates = array();
- $templates['Génériques'] = array('text' => 'Page de texte');
+ $templates['Génériques'] = array('text' => 'Page de texte', 'liens' => 'Liens', 'faq' => 'Questions / Réponses', 'temoignages' => 'Témoignages');
$templates['Accueil'] = array('home' => 'Page d\'accueil');
+ $templates['Le centre'] = array('equipe' => 'L\'équipe');
+ $templates['Parcours patient'] = array('parcours' => 'Parcours');
+ $templates['Infos pratiques'] = array('plan' => 'Plan du centre',
+ 'acces' => 'Plan d\accès',
+ 'rendezvous' => 'Demande de rendez-vous');
$templates['Redirections'] = array(
'externalredirection' => 'Redirection externe',
'nextredirection' => 'Redirection vers la première sous-rubrique',
$image->setLabel('Image en tête des contenus');
$image->setMaxItems(1);
$this->addElement($image);
+
+ $sidebar = new CCGM_Form_CMS_Sub_Sidebar('sidebar');
+ $sidebar->setLegend('Colonne de droite');
+ $this->addSubForm($sidebar, 'sidebar');
}
}
--- /dev/null
+<?php
+
+class CCGM_Form_CMS_Sub_Sidebar extends CubeIT_Form_SubForm {
+
+ public function init() {
+ parent::init();
+
+ $image = new CubeIT_Form_Element_File_Image('image');
+ $image->setLabel('Image');
+ $image->setMaxItems(1);
+ $this->addElement($image);
+
+ $contenu = new CCGM_Form_Element_Markitup_Essential('text');
+ $contenu->setLabel('Bloc de texte');
+ $contenu->setAttrib('rows', 6);
+ $this->addElement($contenu);
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+
+class CCGM_Form_Element_Markitup_Essential extends CubeIT_Form_Element_Markitup {
+
+ public function initSettings() {
+ $this->addBold();
+ $this->addItalic();
+ $this->addLink();
+ }
+
+}
+
+?>
--- /dev/null
+<?php
+
+class CCGM_View_Helper_Rightbar extends Zend_View_Helper_Abstract {
+
+ public function rightbar() {
+ if (!isset($this->view->sidebar)) {
+ return;
+ }
+
+ $s = $this->view->sidebar;
+ if (trim($s['text']) == '' && !count($s['image'])) {
+ return;
+ }
+
+ $this->view->headScript()->addScriptAndStyle('rightbar');
+
+ $res.='<aside id="rightbar">';
+ $res.=$this->view->imageProcess($s['image'], '', 262, null, array(), 'R');
+ $res.='<section>';
+ $res.=$this->view->markupDotclear($s['text']);
+ $res.='</section>';
+ $res.='</aside>';
+ return $res;
+ }
+
+}
+
+?>
$content = $this->layout()->content . "\n";\r
\r
\r
-if ($this->currentPage->getTemplate() == 'home') {\r
+if (isset($this->currentPage) && $this->currentPage->getTemplate() == 'home') {\r
$c = $content;\r
} else {\r
$leftbar = $this->leftbar();\r
<section id="content">\r
- <?php echo $this->markupDotclear($this->text); ?>\r
+ <div id="c">\r
+ <?php echo $this->markupDotclear($this->text); ?>\r
+ </div>\r
+ <?php echo $this->rightbar() ?>\r
</section>
\ No newline at end of file