[{assign var="actCategory" value=$oView->getActiveCategory()}]

[{capture append="oxidBlock_sidebar"}]
    [{assign var="listType" value=$oView->getListType()}]
    [{if $listType=='manufacturer' || $listType=='vendor'}]
        [{if $actCategory && $actCategory->getIconUrl()}]
        <div class="box">
            <h3>
                [{if $listType=='manufacturer'}]
                    [{oxmultilang ident="BRAND"}]
                [{elseif $listType=='vendor'}]
                    [{oxmultilang ident="VENDOR"}]
                [{/if}]
            </h3>
            <div class="featured icon">
                <img src="[{$oViewConf->getImageUrl('spinner.gif')}]" data-src="[{$actCategory->getIconUrl()}]" alt="[{$actCategory->getTitle()}]">
            </div>
        </div>
        [{/if}]
    [{/if}]
[{/capture}]

[{assign var="blUseB2bContent" value=false}]
[{if $oxcmp_user}]
	[{if $oxcmp_user->isB2bUser()}]
		[{assign var="blUseB2bContent" value=true}]
	[{/if}]
[{/if}]

[{assign var="catCMSPageId" value="content_cat_id_"|cat:$actCategory->oxcategories__oxid->value}]
[{assign var="catCMSPageIdB2B" value=$catCMSPageId|cat:"_b2b"}]
[{assign var="catCMSPageFound" value=0}]
[{assign var="catCMSPage" value=""}]

[{if $blUseB2bContent}]
	[{oxifcontent ident=$catCMSPageIdB2B}]
	    [{assign var="catCMSPageFound" value=1}]
			[{assign var="catCMSPage" value=$catCMSPageIdB2B}]
	[{/oxifcontent}]
[{/if}]
[{oxifcontent ident=$catCMSPageId}]
		[{assign var="catCMSPage" value=$catCMSPageId}]
    [{assign var="catCMSPageFound" value=1}]
[{/oxifcontent}]

[{if $catCMSPageFound}]
    [{capture append="oxidBlock_content"}]
			[{oxifcontent ident=$catCMSPage object="oCont"}]
		    [{if !$oCont->oxcontents__ddhidetitle->value}]
					<div class="page-header">
		        <h1 class="h1">
		            [{$actCategory->getTitle()}]
		        </h1>
		      </div>

					[{assign var="oPageNavigation" value=$oView->getPageNavigation()}]
	        [{if $actCategory && $actCategory->getShortDescription() && $oPageNavigation->actPage == 1}]
		        <p id="catDescLocator" class="categoryDescription">
		            [{$actCategory->oxcategories__oxdesc->rawValue}]
		        </p>
	        [{/if}]

	        [{if $actCategory->oxcategories__oxlongdesc->value && $oPageNavigation->actPage == 1}]
	            [{if $actCategory->oxcategories__oxlongdesc->value|strlen > 250}]
				        <input type="checkbox" class="readmoreState" id="catLongDescLocatorState" />
				        <div id="catLongDescLocator" class="categoryDescription">
	            		[{oxeval var=$actCategory->oxcategories__oxlongdesc->value|substr:0:250}]<label for="catLongDescLocatorState" class="readmoreTrigger">[{oxmultilang ident="READMORE"}]&nbsp;&hellip;</label><span class="readmoreContent">[{oxeval var=$actCategory->oxcategories__oxlongdesc->value|substr:250}]</span>
			        	</div>
	            [{else}]
				        <div id="catLongDescLocator" class="categoryDescription">
		    	        [{oxeval var=$actCategory->oxcategories__oxlongdesc->value}]
	  		      	</div>
	            [{/if}]
	        [{/if}]
				[{/if}]

				[{$oCont->oxcontents__oxcontent->value}]
			[{/oxifcontent}]
    [{/capture}]
[{else}]

    [{capture append="oxidBlock_content"}]
        [{block name="page_list_listhead"}]
            <div class="page-header">
                [{assign var='rsslinks' value=$oView->getRssLinks()}]
                <h1 class="h1">
                    [{$actCategory->getTitle()}]
                    [{if $rsslinks.activeCategory}]
                        <a class="rss" id="rssActiveCategory" aria-label="RSS Current Category" href="[{$rsslinks.activeCategory.link}]" title="[{$rsslinks.activeCategory.title}]" target="_blank">
                            <i class="fas fa-rss"></i>
                        </a>
                    [{/if}]
                </h1>
            </div>

            [{assign var="oPageNavigation" value=$oView->getPageNavigation()}]
            [{if $actCategory && $actCategory->getShortDescription() && $oPageNavigation->actPage == 1}]
                <p id="catDescLocator" class="categoryDescription">
                    [{$actCategory->oxcategories__oxdesc->rawValue}]
                </p>
            [{/if}]

            [{if $actCategory->oxcategories__oxlongdesc->value && $oPageNavigation->actPage == 1}]
                [{if $actCategory->oxcategories__oxlongdesc->value|strlen > 250}]
			            <input type="checkbox" class="readmoreState" id="catLongDescLocatorState" />
			            <div id="catLongDescLocator" class="categoryDescription">
			                [{oxeval var=$actCategory->oxcategories__oxlongdesc->value|substr:0:250}]<label for="catLongDescLocatorState" class="readmoreTrigger">[{oxmultilang ident="READMORE"}]&nbsp;&hellip;</label><span class="readmoreContent">[{oxeval var=$actCategory->oxcategories__oxlongdesc->value|substr:250}]</span>
			            </div>
                [{else}]
			            <div id="catLongDescLocator" class="categoryDescription">
			                [{oxeval var=$actCategory->oxcategories__oxlongdesc->value}]
			            </div>
                [{/if}]
            [{/if}]

						[{assign var="catPreListPageId" value="content_prelist_"|cat:$actCategory->oxcategories__oxid->value}]
						[{if $blUseB2bContent}]
							[{assign var="catPreListPageIdB2B" value=$catPreListPageId|cat:"_b2b"}]
							[{oxifcontent ident=$catPreListPageIdB2B}]
						    [{oxcontent ident=$catPreListPageIdB2B}]
							[{/oxifcontent}]
						[{else}]
							[{oxifcontent ident=$catPreListPageId}]
							    [{oxcontent ident=$catPreListPageId}]
							[{/oxifcontent}]
						[{/if}]
        [{/block}]

        [{block name="page_list_listbody"}]
            [{if $oView->getArticleList()}]
                [{if $oView->getArticleList()|count}]
                    [{block name="page_list_upperlocator"}]
                        <div class="listRefine">
                            [{include file="widget/locator/listlocator.tpl" locator=$oView->getPageNavigationLimitedTop() attributes=$oView->getAttributes() listDisplayType=true itemsPerPage=true sort=true}]
                        </div>
                    [{/block}]

                    [{* List types: grid|line|infogrid *}]
                    [{block name="page_list_productlist"}]
                        [{include file="widget/product/list.tpl" type=$oView->getListDisplayType() listId="productList" products=$oView->getArticleList()}]
                    [{/block}]
                    [{block name="page_list_bottomlocator"}]
                        [{include file="widget/locator/listlocator.tpl" locator=$oView->getPageNavigationLimitedBottom() place="bottom"}]
                    [{/block}]
                [{/if}]
            [{/if}]
        [{/block}]


				[{assign var="catPostListPageId" value="content_postlist_"|cat:$actCategory->oxcategories__oxid->value}]
				[{if $blUseB2bContent}]
					[{assign var="catPostListPageIdB2B" value=$catPostListPageId|cat:"_b2b"}]
					[{oxifcontent ident=$catPostListPageIdB2B}]
				    [{oxcontent ident=$catPostListPageIdB2B}]
					[{/oxifcontent}]
				[{else}]
					[{oxifcontent ident=$catPostListPageId}]
					    [{oxcontent ident=$catPostListPageId}]
					[{/oxifcontent}]
				[{/if}]

        [{insert name="oxid_tracker"}]
    [{/capture}]
[{/if}]

[{include file="layout/page.tpl" tree_path=$oView->getTreePath()}]
