mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 09:03:38 +02:00
Issue #1625 body class definition in section init
Initialize body_classes in common.inc.php Add class for section and section id also add class with search id Class is added to $page in section_init now Also add tis info to the body dataset for javascript use
This commit is contained in:
@@ -112,26 +112,6 @@ if ( empty($page['is_external']) )
|
||||
//----------------------------------------------------- template initialization
|
||||
$page['body_id'] = 'theCategoryPage';
|
||||
|
||||
if ('categories' == $page['section'] && isset($page['category']))
|
||||
{
|
||||
$page['body_class'] = 'category_'.$page['category']['id'];
|
||||
if (isset($page['combined_categories']))
|
||||
{
|
||||
foreach ($page['combined_categories'] as $combined_categories)
|
||||
{
|
||||
$page['body_class'] .= '_'.$combined_categories['id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isset($page['tags']))
|
||||
{
|
||||
$page['body_class'] = 'tag';
|
||||
foreach ($page['tags'] as $tag)
|
||||
{
|
||||
$page['body_class'] .= '_'.$tag['id'];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($page['flat']) or isset($page['chronology_field']))
|
||||
{
|
||||
$template->assign(
|
||||
|
||||
Reference in New Issue
Block a user