tinymce gen page title
This commit is contained in:
parent
25044c9a9f
commit
ff158eed04
@ -784,7 +784,7 @@ class common
|
||||
// Boucler sur les enfants et récupérer le tableau children avec la liste des enfants
|
||||
foreach ($childIds as $childId) {
|
||||
$children[] = [
|
||||
'title' => '↳' . html_entity_decode($this->getData(['page', $childId, 'shortTitle']), ENT_QUOTES),
|
||||
'title' => '↳' . html_entity_decode($this->getData(['page', $childId, 'title']), ENT_QUOTES),
|
||||
'value' => $rewrite . $childId
|
||||
];
|
||||
}
|
||||
@ -792,18 +792,18 @@ class common
|
||||
if (empty($childIds)) {
|
||||
// Pas d'enfant, uniquement l'entrée du parent
|
||||
$parents[] = [
|
||||
'title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES),
|
||||
'title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES),
|
||||
'value' => $rewrite . $parentId
|
||||
];
|
||||
} else {
|
||||
// Des enfants, on ajoute la page parent en premier
|
||||
array_unshift($children, [
|
||||
'title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES),
|
||||
'title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES),
|
||||
'value' => $rewrite . $parentId
|
||||
]);
|
||||
// puis on ajoute les enfants au parent
|
||||
$parents[] = [
|
||||
'title' => html_entity_decode($this->getData(['page', $parentId, 'shortTitle']), ENT_QUOTES),
|
||||
'title' => html_entity_decode($this->getData(['page', $parentId, 'title']), ENT_QUOTES),
|
||||
'value' => $rewrite . $parentId,
|
||||
'menu' => $children
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user