<?xml version="1.0" encoding="UTF-8"?><!--
 @package Default Template V8 for SobiPro multi-directory component with content construction support

 @author
 Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 Url: https://www.Sigsiu.NET

 @copyright Copyright (C) 2006–2024 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 @license GNU/GPL Version 3
 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3
 as published by the Free Software Foundation, and under the additional terms according to section 7 of GPL v3.
 See https://www.gnu.org/licenses/gpl.html and https://www.sigsiu.net/licenses.

 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
	<xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="UTF-8"/>

	<xsl:include href="../common/globals.xsl"/> <!-- do not comment or remove -->
	<xsl:include href="../common/topmenu.xsl"/>
	<xsl:include href="../common/alphamenu.xsl"/>
	<xsl:include href="../common/categories.xsl"/>
	<xsl:include href="../common/entries.xsl"/>
	<xsl:include href="../common/navigation.xsl"/>
	<xsl:include href="../common/messages.xsl"/>
	<xsl:include href="../common/sortview.xsl"/>

	<xsl:template match="/section">
		<xsl:variable name="sectionName">
			<xsl:value-of select="name"/>
		</xsl:variable>

		<xsl:if test="//config/deactivaterss/@value = 0">
			<xsl:variable name="rssUrl">{"sid":"<xsl:value-of select="id"/>","sptpl":"feeds.rss","out":"raw"}
			</xsl:variable>
			<xsl:value-of select="php:function( 'SobiPro::AlternateLink', $rssUrl, 'application/atom+xml', $sectionName )"/>
		</xsl:if>

		<!-- for proper work a container is needed, we assume that the component area is placed into a container by the template.
		If not, you need to add a container around the SobiPro output here -->
		<div id="skip">
			<a href="#content">Skip Navigation</a>
		</div>
		<div class="sp-listing section">
			<xsl:call-template name="topMenu">
				<xsl:with-param name="searchbox">true</xsl:with-param>
				<xsl:with-param name="title"/>
			</xsl:call-template>
			<xsl:apply-templates select="alphaMenu"/>
			<xsl:apply-templates select="messages"/>

			<div id="content" data-category="{id}">
				<xsl:if test="string-length(description) > 0">
					<div class="sp-section-description" data-role="content">
						<xsl:value-of select="description" disable-output-escaping="yes"/>
					</div>
				</xsl:if>

				<xsl:if test="//config/hidecategories/@value != 'none'">
					<xsl:if test="//config/hidecategories/@value = 'hide'">
						<div class="sp-category-button">
							<input id="spctrl-category-show" class="btn btn-alpha" name="spCategoryShow" type="button"/>
						</div>
					</xsl:if>
					<xsl:call-template name="categoriesLoop"/>
				</xsl:if>

				<xsl:apply-templates select="orderingMenu"/>
				<div class="sp-entries-container" id="spctrl-entry-container">
					<xsl:call-template name="entriesLoop"/>
				</div>
				<xsl:apply-templates select="navigation"/>

				<xsl:call-template name="bottomHook"/>
			</div>
		</div>
		<input type="hidden" id="hidetext" value="{php:function( 'SobiPro::TemplateTxt', 'CATEGORIES_HIDE' )}"/>
		<input type="hidden" id="showtext" value="{php:function( 'SobiPro::TemplateTxt', 'CATEGORIES_SHOW' )}"/>
	</xsl:template>
</xsl:stylesheet>
