{{if $club = $category->club()}} {{if settings.clubs and settings.clubs_header == 'full'}} {template="header" app="core" group="clubs" params="$club, $category"} {{endif}}
{{endif}}

{$category->_title}

{{if $category->show_rules || \IPS\Member::loggedIn()->language()->get('gallery_category_' . $category->_id . '_desc')}}
{{if $category->show_rules == 1}} id}_rulestitle"}" data-ipsDialog-content="#elCategoryRules">{lang="category_rules"}
{template="richText" group="global" app="core" location="global" params="\IPS\Member::loggedIn()->language()->addToStack('gallery_category_' . $category->id . '_rules'), array('ipsType_medium')"}
{{elseif $category->show_rules == 2}} {lang="gallery_category_{$category->id}_rulestitle"} {template="richText" group="global" app="core" location="global" params="\IPS\Member::loggedIn()->language()->addToStack('gallery_category_' . $category->id . '_rules'), array('ipsType_normal', 'ipsSpacer_top')"} {{endif}} {{if \IPS\Member::loggedIn()->language()->get('gallery_category_' . $category->_id . '_desc')}} {template="richText" group="global" app="core" location="global" params="$category->description, array('ipsType_medium', 'ipsSpacer_both')"} {{endif}}
{{endif}}
{{$followerCount = \IPS\gallery\Image::containerFollowerCount( $category );}} {template="follow" app="core" group="global" params="'gallery', 'category', $category->_id, $followerCount"}
{{if $category->can('add') and ( $category->allow_albums != 2 or member.group['g_create_albums'] or \IPS\gallery\Album::loadForSubmit( $category ) )}} {{endif}} {{if $category->children()}}
{template="categoryGrid" group="browse" app="gallery" params="$category->children()"}
{{endif}} {{if $albums}}
{$albums|raw}
{{endif}} {{if $table}}
{$table|raw}
{{endif}}
{template="follow" app="core" group="global" params="'gallery', 'category', $category->_id, $followerCount"}
{{if $category->club()}}
{{endif}}