include sticky and static pages to the categories
This commit is contained in:
parent
bdf585b8db
commit
54868df652
|
@ -21,13 +21,19 @@ class Categories extends dbList {
|
||||||
$this->db[$key]['list'] = array();
|
$this->db[$key]['list'] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a database with published pages
|
// Get pages database
|
||||||
$db = $pages->getPublishedDB(false);
|
$db = $pages->getDB(false);
|
||||||
foreach ($db as $pageKey=>$pageFields) {
|
foreach ($db as $pageKey=>$pageFields) {
|
||||||
if (!empty($pageFields['category'])) {
|
if (!empty($pageFields['category'])) {
|
||||||
$categoryKey = $pageFields['category'];
|
$categoryKey = $pageFields['category'];
|
||||||
if (isset($this->db[$categoryKey]['list'])) {
|
if (isset($this->db[$categoryKey]['list'])) {
|
||||||
array_push($this->db[$categoryKey]['list'], $pageKey);
|
if (
|
||||||
|
($db[$pageKey]['type']=='published') ||
|
||||||
|
($db[$pageKey]['type']=='sticky') ||
|
||||||
|
($db[$pageKey]['type']=='static')
|
||||||
|
) {
|
||||||
|
array_push($this->db[$categoryKey]['list'], $pageKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue