Titres courts

This commit is contained in:
Fred Tempez 2021-11-04 13:55:23 +01:00
parent 6028cd4d0a
commit 0779284c5f
6 changed files with 79 additions and 42 deletions

View File

@ -3,7 +3,9 @@
## Version 11.2.00 ## Version 11.2.00
- Modifications : - Modifications :
- Disposition des options de configuration du site. - Disposition des options de configuration du site.
- Pages : il est désormais possible de donner un nom de page court qui sera utilisé dans le menu du site, dans les abrres latérales et dans les sélecteurs de page (éditeur / lien). En revanche le nom de la page affiché en haut de celle-ci est inchangé. Dans la plupart des cas le titre court sera identique au titre.
- Les écrans d'aide renvoient vers le site doc.zwiicms.fr - Les écrans d'aide renvoient vers le site doc.zwiicms.fr
- Mise en évidence du statut des pages dans la liste de la barre d'administration. Rouge italique : page orpheline ; Orange gras page inactive.
## Version 11.1.01 ## Version 11.1.01
- Corrections : - Corrections :

View File

@ -800,23 +800,23 @@ class common {
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) { if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
// Boucler sur les enfants et récupérer le tableau children avec la liste des enfants // Boucler sur les enfants et récupérer le tableau children avec la liste des enfants
foreach($childIds as $childId) { foreach($childIds as $childId) {
$children [] = [ 'title' => ' » '. html_entity_decode($this->getData(['page', $childId, 'title']), ENT_QUOTES) , $children [] = [ 'title' => ' » '. html_entity_decode($this->getData(['page', $childId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$childId 'value'=> $rewrite.$childId
]; ];
} }
// Traitement // Traitement
if (empty($childIds)) { if (empty($childIds)) {
// Pas d'enfant, uniquement l'entrée du parent // Pas d'enfant, uniquement l'entrée du parent
$parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES) , $parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$parentId 'value'=> $rewrite.$parentId
]; ];
} else { } else {
// Des enfants, on ajoute la page parent en premier // Des enfants, on ajoute la page parent en premier
array_unshift ($children , ['title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES) , array_unshift ($children , ['title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$parentId 'value'=> $rewrite.$parentId
]); ]);
// puis on ajoute les enfants au parent // puis on ajoute les enfants au parent
$parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES) , $parents [] = ['title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES) ,
'value'=> $rewrite.$parentId , 'value'=> $rewrite.$parentId ,
'menu' => $children 'menu' => $children
]; ];
@ -1584,24 +1584,24 @@ class common {
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' : case '' :
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']); $itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
break; break;
case 'text' : case 'text' :
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']); $itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
break; break;
case 'icon' : case 'icon' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") { if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />'; $itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
} else { } else {
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']); $itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
} }
break; break;
case 'icontitle' : case 'icontitle' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") { if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="'; $itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'titlshortTitlee']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']).'"/>'; $itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']).'"/>';
} else { } else {
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']); $itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
} }
break; break;
} }
@ -1644,32 +1644,32 @@ class common {
switch ($this->getData(['page', $childKey, 'typeMenu'])) { switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' : case '' :
$itemsLeft .= $this->getData(['page', $childKey, 'title']); $itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
break; break;
case 'text' : case 'text' :
$itemsLeft .= $this->getData(['page', $childKey, 'title']); $itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
break; break;
case 'icon' : case 'icon' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") { if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />'; $itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
} else { } else {
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']); $itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
} }
break; break;
case 'icontitle' : case 'icontitle' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") { if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="'; $itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $childKey, 'title']).'"/>'; $itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']).'"/>';
} else { } else {
$itemsLeft .= $this->getData(['page', $childKey, 'title']); $itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
} }
break; break;
case 'icontext' : case 'icontext' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") { if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />'; $itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= $this->getData(['page', $childKey, 'title']); $itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
} else { } else {
$itemsLeft .= $this->getData(['page', $childKey, 'title']); $itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
} }
break; break;
} }
@ -1757,7 +1757,7 @@ class common {
} else { } else {
$items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $active .'>'; $items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $active .'>';
} }
$items .= $this->getData(['page', $parentPageId, 'title']); $items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$items .= '</a>'; $items .= '</a>';
} }
$itemsChildren = ''; $itemsChildren = '';
@ -1780,7 +1780,7 @@ class common {
$itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $active . '>'; $itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $active . '>';
} }
$itemsChildren .= $this->getData(['page', $childKey, 'title']); $itemsChildren .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsChildren .= '</a></li>'; $itemsChildren .= '</a></li>';
} }
// Concatène les items enfants // Concatène les items enfants
@ -1844,7 +1844,6 @@ class common {
$notificationClass = 'notificationSuccess'; $notificationClass = 'notificationSuccess';
} }
if(common::$inputNotices) { if(common::$inputNotices) {
var_dump ( common::$inputNotices );
$notification = 'Impossible de soumettre le formulaire, car il contient des erreurs'; $notification = 'Impossible de soumettre le formulaire, car il contient des erreurs';
$notificationClass = 'notificationError'; $notificationClass = 'notificationError';
} }
@ -1898,22 +1897,22 @@ class common {
helper::baseUrl() . helper::baseUrl() .
$parentPageId . '"' . $parentPageId . '"' .
($parentPageId === $currentPageId ? ' selected' : false) . ($parentPageId === $currentPageId ? ' selected' : false) .
'class="' . ' class="' .
($this->getData(['page', $parentPageId, 'disable']) === true ? 'pageInactive' : '') . ($this->getData(['page', $parentPageId, 'disable']) === true ? 'pageInactive' : '') .
($this->getData(['page', $parentPageId, 'position']) === 0 ? ' pageHidden' : '') . ($this->getData(['page', $parentPageId, 'position']) === 0 ? ' pageHidden' : '') .
'">' . '">' .
$this->getData(['page', $parentPageId, 'title']) . $this->getData(['page', $parentPageId, 'shortTitle']) .
'</option>'; '</option>';
foreach($childrenPageIds as $childKey) { foreach($childrenPageIds as $childKey) {
$leftItems .= '<option value="' . $leftItems .= '<option value="' .
helper::baseUrl() . helper::baseUrl() .
$childKey . '"' . $childKey . '"' .
($childKey === $currentPageId ? ' selected' : false) . ($childKey === $currentPageId ? ' selected' : false) .
'class="' . ' class="' .
($this->getData(['page', $childKey, 'disable']) === true ? 'pageInactive' : '') . ($this->getData(['page', $childKey, 'disable']) === true ? 'pageInactive' : '') .
($this->getData(['page', $childKey, 'position']) === 0 ? ' pageHidden' : '') . ($this->getData(['page', $childKey, 'position']) === 0 ? ' pageHidden' : '') .
'">&nbsp;&nbsp;&nbsp;&nbsp;' . '">&nbsp;&nbsp;&nbsp;&nbsp;' .
$this->getData(['page', $childKey, 'title']) . $this->getData(['page', $childKey, 'shortTitle']) .
'</option>'; '</option>';
} }
} }
@ -1922,9 +1921,9 @@ class common {
// Afficher les barres // Afficher les barres
$leftItems .= '<optgroup label="Barres latérales">'; $leftItems .= '<optgroup label="Barres latérales">';
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) { foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
$leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'title']) . '</option>'; $leftItems .= '<option value="' . helper::baseUrl() . $parentPageId . '"' . ($parentPageId === $currentPageId ? ' selected' : false) . '>' . $this->getData(['page', $parentPageId, 'shortTitle']) . '</option>';
foreach($childrenPageIds as $childKey) { foreach($childrenPageIds as $childKey) {
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->getData(['page', $childKey, 'title']) . '</option>'; $leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->getData(['page', $childKey, 'shortTitle']) . '</option>';
} }
} }
$leftItems .= '</optgroup>'; $leftItems .= '</optgroup>';

View File

@ -681,6 +681,17 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
$this->setData(['config', 'connect', 'autoDisconnect', $this->getData(['config', 'autoDisconnect'])]); $this->setData(['config', 'connect', 'autoDisconnect', $this->getData(['config', 'autoDisconnect'])]);
$this->deleteData(['config', 'autoDisconnect']); $this->deleteData(['config', 'autoDisconnect']);
// Ajout de la variable shortTitle basée sur Title
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
$pageList [] = $parentKey;
foreach ($parentValue as $childKey) {
$pageList [] = $childKey;
}
}
foreach ($pageList as $parentKey => $parent) {
$this->setData(['page', $parent, 'shortTitle', $this->getData(['page', $parent, 'title']) ]);
}
// Mise à jour // Mise à jour
$this->setData(['core', 'dataVersion', 11200]); $this->setData(['core', 'dataVersion', 11200]);
} }

View File

@ -92,6 +92,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Accueil', 'title' => 'Accueil',
'shortTitle' => 'Accueil',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -245,6 +246,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Accueil', 'title' => 'Accueil',
'shortTitle' => 'Accueil',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -267,7 +269,8 @@ class init extends common {
'position' => 1, 'position' => 1,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Enfant', 'title' => 'Page Enfant',
'shortTitle' => 'Enfant',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -290,7 +293,8 @@ class init extends common {
'position' => 2, 'position' => 2,
'group' => self::GROUP_MEMBER, 'group' => self::GROUP_MEMBER,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Privée', 'title' => 'Page privée',
'shortTitle' => 'Privée',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -314,6 +318,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Mise en page', 'title' => 'Mise en page',
'shortTitle' => 'Mise en page',
'block' => '4-8', 'block' => '4-8',
'barLeft' => 'barre', 'barLeft' => 'barre',
'barRight' => '', 'barRight' => '',
@ -336,7 +341,8 @@ class init extends common {
'position' => 3, 'position' => 3,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Menu latéral', 'title' => 'Barre latérale avec menu',
'shortTitle' => 'Menu latéral',
'block' => '9-3', 'block' => '9-3',
'barLeft' => '', 'barLeft' => '',
'barRight' => 'barrelateraleavecmenu', 'barRight' => 'barrelateraleavecmenu',
@ -360,6 +366,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Blog', 'title' => 'Blog',
'shortTitle' => 'Blog',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -382,7 +389,8 @@ class init extends common {
'position' => 4, 'position' => 4,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Galeries', 'title' => 'Galeries d\'images',
'shortTitle' => 'Galeries',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -407,6 +415,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => true, 'targetBlank' => true,
'title' => 'Site de Zwii', 'title' => 'Site de Zwii',
'shortTitle' => 'Site de Zwii',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -430,6 +439,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Contact', 'title' => 'Contact',
'shortTitle' => 'Contact',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -453,6 +463,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Barre latérale', 'title' => 'Barre latérale',
'shortTitle' => 'Barre latérale',
'block' => 'bar', 'block' => 'bar',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -476,6 +487,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Barre latérale avec menu', 'title' => 'Barre latérale avec menu',
'shortTitle' => 'Barre latérale avec menu',
'block' => 'bar', 'block' => 'bar',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -499,6 +511,7 @@ class init extends common {
'group' => 0, 'group' => 0,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Mentions légales', 'title' => 'Mentions légales',
'shortTitle' => 'Mentions légales',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -523,6 +536,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Maintenance en cours', 'title' => 'Maintenance en cours',
'shortTitle' => 'Maintenance en cours',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -547,6 +561,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Erreur 403', 'title' => 'Erreur 403',
'shortTitle' => 'Erreur 403',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -570,6 +585,7 @@ class init extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Erreur 404', 'title' => 'Erreur 404',
'shortTitle' => 'Erreur 404',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -592,7 +608,8 @@ class init extends common {
'position' => 7, 'position' => 7,
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => 'Recherche', 'title' => 'Recherche dans le site',
'shortTitle' => 'Rechercher',
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',

View File

@ -142,6 +142,7 @@ class page extends common {
'group' => self::GROUP_VISITOR, 'group' => self::GROUP_VISITOR,
'targetBlank' => false, 'targetBlank' => false,
'title' => $pageTitle, 'title' => $pageTitle,
'shortTitle' => $pageTitle,
'block' => '12', 'block' => '12',
'barLeft' => '', 'barLeft' => '',
'barRight' => '', 'barRight' => '',
@ -426,6 +427,7 @@ class page extends common {
'group' => $this->getinput('pageEditBlock') !== 'bar' ? $this->getInput('pageEditGroup', helper::FILTER_INT) : 0, 'group' => $this->getinput('pageEditBlock') !== 'bar' ? $this->getInput('pageEditGroup', helper::FILTER_INT) : 0,
'targetBlank' => $this->getInput('pageEditTargetBlank', helper::FILTER_BOOLEAN), 'targetBlank' => $this->getInput('pageEditTargetBlank', helper::FILTER_BOOLEAN),
'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT), 'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT),
'shortTitle' => $this->getInput('pageEditShortTitle', helper::FILTER_STRING_SHORT, true),
'block' => $this->getinput('pageEditBlock'), 'block' => $this->getinput('pageEditBlock'),
'barLeft' => $barLeft, 'barLeft' => $barLeft,
'barRight' => $barRight, 'barRight' => $barRight,
@ -495,6 +497,8 @@ class page extends common {
self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']); self::$pagesBarId[$parentPageId] = $this->getData(['page', $parentPageId, 'title']);
} }
} }
// Mise à jour de la liste des pages pour TinyMCE
$this->pages2Json();
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'title' => $this->getData(['page', $this->getUrl(2), 'title']), 'title' => $this->getData(['page', $this->getUrl(2), 'title']),

View File

@ -1,9 +1,6 @@
<?php <?php echo template::formOpen('pageEditForm'); ?>
echo template::formOpen('pageEditForm');
// Mise à jour de la liste des pages pour TinyMCE
$this->pages2Json(); ?>
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php $href = helper::baseUrl() . $this->getUrl(2); ?> <?php $href = helper::baseUrl() . $this->getUrl(2); ?>
<?php if ($this->getData(['page', $this->getUrl(2), 'moduleId']) === 'redirection' || 'code')$href = helper::baseUrl(); ?> <?php if ($this->getData(['page', $this->getUrl(2), 'moduleId']) === 'redirection' || 'code')$href = helper::baseUrl(); ?>
<?php echo template::button('pageEditBack', [ <?php echo template::button('pageEditBack', [
@ -68,13 +65,20 @@ echo template::formOpen('pageEditForm');
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col4"> <div class="col2">
<?php echo template::text('pageEditShortTitle', [
'label' => 'Titre Court',
'value' => $this->getData(['page', $this->getUrl(2), 'shortTitle']),
'help' => 'Le titre court est affiché dans les menus. Il peut être identique au titre de la page.'
]); ?>
</div>
<div class="col3">
<?php echo template::select('pageTypeMenu', $module::$typeMenu,[ <?php echo template::select('pageTypeMenu', $module::$typeMenu,[
'label' => 'Aspect du lien', 'label' => 'Aspect du lien',
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu']) 'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col3">
<?php echo template::file('pageIconUrl', [ <?php echo template::file('pageIconUrl', [
'help' => 'Sélectionnez une image ou une icône de petite dimension', 'help' => 'Sélectionnez une image ou une icône de petite dimension',
'label' => 'Icône', 'label' => 'Icône',