{##
 # The template used to draw the KB category sidebar block
 ##}
<section class="dp-sidebar-block">
	<header>
		<h3>
			<a href="{{ path('user_articles_home') }}">{% if title %}{{ title }}{% else %}{{ phrase('user.knowledgebase.knowledgebase') }}{% endif %}</a>
		</h3>
	</header>
	<article class="dp-written">
		<p class="dp-summary">
			{{ phrase('user.knowledgebase.sidebar_description', {count: counts['0_total']|default(0)}) }}
		</p>
		<ul class="dp-cat-list">
			{% for cat in categories %}
				<li>
					<div class="dp-fadeaway-container">
						<i class="dp-icon-folder-close"></i>
						<a class="dp-fadetitle" href="{{ path('user_articles', {slug: cat.url_slug}) }}">{{ phrase_object(cat) }}</a>
						<div class="dp-fadeaway"></div>
						<a href="{{ path('user_articles', {slug: cat.url_slug}) }}" class="dp-badge dp-small">{{ counts[cat.id ~ '_total']|default(0) }}</a>
					</div>
				</li>
			{% endfor %}
		</ul>
	</article>
</section>