forked from ZwiiCMS-Team/ZwiiCMS
[9.0.21] Pages parentes non sélectionnables dans lien de TinyMCE
This commit is contained in:
parent
96cf295374
commit
67cda016a4
@ -553,23 +553,17 @@ class common {
|
|||||||
$children = [];
|
$children = [];
|
||||||
// Exclure les barres
|
// Exclure les barres
|
||||||
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
|
if ($this->getData(['page', $parentId, 'block']) !== 'bar' ) {
|
||||||
|
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
||||||
|
'value'=> $rewrite.$parentId
|
||||||
|
];
|
||||||
foreach($childIds as $childId) {
|
foreach($childIds as $childId) {
|
||||||
$children [] = ['title' => $this->getData(['page', $childId, 'title']) ,
|
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) . ' / '. $this->getData(['page', $childId, 'title']) ,
|
||||||
'value'=> $rewrite.$childId
|
'value'=> $rewrite.$childId
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (empty($childIds)) {
|
|
||||||
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
|
||||||
'value'=> $rewrite.$parentId
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
$parents [] = ['title' => $this->getData(['page', $parentId, 'title']) ,
|
|
||||||
'value'=> $rewrite.$parentId ,
|
|
||||||
'menu' => $children
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 3 tentatives
|
// 3 tentatives
|
||||||
for($i = 0; $i < 3; $i++) {
|
for($i = 0; $i < 3; $i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user