getSiteId's does not take into account when a parent page is inactive
Site structure:
[Blog]
--[Category_1 - INACTIVE]
-----[Entry_1 - active]
-----[Entry_2 - active]
--[Category_2 - active]
----[Entry_3 - active]
----[Entry_4 - active]
----[Entry_5 - active]
The ChildrenList QUI\Controls\ChildrenList
uses this method: $Project->getSitesIds()
.
if ($this->getAttribute('parentInputList')) {
// for bricks
$count_children = Utils::getSitesByInputList($Project, $parents, [
'count' => 'count',
'order' => $this->getAttribute('order')
]);
} else {
// for site types
if ($this->getAttribute('byType')) {
$count_children = $Project->getSitesIds([ // <--- I'm talking about this
'count' => 'count',
'where' => [
'type' => $this->getAttribute('byType')
]
]);
if (is_array($count_children[0])) {
$count_children = $count_children[0]['count'];
}
} else {
$count_children = $Site->getChildren([
'count' => 'count',
'where' => $this->getAttribute('where')
]);
}
}
Unfortunately I get the list of children even if the parent page is disabled. Is there a way to exclude the pages directly by fetching? The ChildrenList lists pages of inactive parents but there is no URL to the child page (href attribute is empty).
I hope the screenshot below can help you to understand that problem ;)