fixes #626 related albums (menu, combine, url)

* ability to combine albums in URL index.php?/category/1/2/3 will consider 1 as $page['category'] and {2,3} as $page['combined_categories']

* new menu block "related albums" which displays only the hierarchy of albums related to the current set of photos, excluding current album(s). In the hierarchy, only the related albums have a link, not ancestors
This commit is contained in:
plegall
2020-11-09 13:00:01 +01:00
parent 35f0450699
commit 4f3880af89
9 changed files with 388 additions and 6 deletions
+16 -2
View File
@@ -211,7 +211,11 @@ $forbidden = get_sql_condition_FandF(
// +-----------------------------------------------------------------------+
if ('categories' == $page['section'])
{
if (isset($page['category']))
if (isset($page['combined_categories']))
{
$page['title'] = get_combined_categories_content_title();
}
elseif (isset($page['category']))
{
$page = array_merge(
$page,
@@ -231,7 +235,17 @@ if ('categories' == $page['section'])
}
// GET IMAGES LIST
if
if (isset($page['combined_categories']))
{
$cat_ids = array($page['category']['id']);
foreach ($page['combined_categories'] as $category)
{
$cat_ids[] = $category['id'];
}
$page['items'] = get_image_ids_for_categories($cat_ids);
}
elseif
(
$page['startcat'] == 0 and
(!isset($page['chronology_field'])) and // otherwise the calendar will requery all subitems