A creuser mais peut-être pas besoin de TemplateSwitcher et de CustomSwitchTemplate, et qu'il suffirait de rajouter juste du Smarty dans layout.tpl et index.html
135 lines
4.8 KiB
HTML
Executable File
135 lines
4.8 KiB
HTML
Executable File
{extends file="layout.tpl"}
|
|
|
|
{block name="init"}
|
|
{$folder_id={folder attr="id"}}
|
|
{/block}
|
|
|
|
{* Body Class *}
|
|
{block name="body-class"}page-folder{/block}
|
|
|
|
{* Page Title *}
|
|
{block name='no-return-functions' append}
|
|
{if $folder_id}
|
|
{loop name="folder.seo.title" type="folder" id=$folder_id limit="1"}
|
|
{$page_title = {$META_TITLE}}
|
|
{/loop}
|
|
{/if}
|
|
{/block}
|
|
|
|
{* Meta *}
|
|
{block name="meta"}
|
|
{if $folder_id}
|
|
{loop name="folder.seo.meta" type="folder" id=$folder_id limit="1"}
|
|
{include file="includes/meta-seo.html"}
|
|
{/loop}
|
|
{/if}
|
|
{/block}
|
|
|
|
{* Breadcrumb *}
|
|
{block name='no-return-functions' append}
|
|
{if $folder_id}
|
|
{$breadcrumbs = []}
|
|
{loop name="folder_path" type="folder-path" folder=$folder_id}
|
|
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
|
{/loop}
|
|
{/if}
|
|
{/block}
|
|
|
|
{block name="feeds"}
|
|
<link rel="alternate" type="application/rss+xml" title="{intl l='All contents in'} {folder attr='title'}" href="{url path="/feed/content/{lang attr="locale"}/{folder attr="id"}"}" />
|
|
{/block}
|
|
|
|
{* Content *}
|
|
{block name="main-content"}
|
|
<div class="main">
|
|
<div class="col-main contents-list" role="main" aria-labelledby="main-label">
|
|
{if $folder_id}
|
|
{loop name="folder" type="folder" id=$folder_id limit="1"}
|
|
<h1 id="main-label" class="page-header">{$TITLE}</h1>
|
|
{if $CHAPO}
|
|
<div class="folder-chapo">
|
|
{$CHAPO}
|
|
</div>
|
|
{/if}
|
|
{if $DESCRIPTION}
|
|
<div class="folder-description">
|
|
{$DESCRIPTION nofilter}
|
|
</div>
|
|
{/if}
|
|
|
|
<div id="folder-contents">
|
|
<div class="contents">
|
|
{ifloop rel="folder_content"}
|
|
<ul>
|
|
{loop name="folder_content" type="content" folder="$ID"}
|
|
<li class="item">
|
|
<article>
|
|
{ifloop rel="content_thumbnail"}
|
|
<a href="{$URL}" tabindex="-1" class="content-image">
|
|
{loop name="content_thumbnail" type="image" width="369" height="247" content=$ID limit="1"}
|
|
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
|
{/loop}
|
|
<span class="mask"></span>
|
|
</a>
|
|
{/ifloop}
|
|
|
|
<div class="content-info">
|
|
<h3 class="name"><a href="{$URL}">{$TITLE}</a></h3>
|
|
|
|
{if $CHAPO}
|
|
<div class="short-description">
|
|
{$CHAPO}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</article><!-- /content -->
|
|
</li>
|
|
{/loop}
|
|
</ul>
|
|
{/ifloop}
|
|
|
|
</div>
|
|
</div><!-- /#category-products -->
|
|
|
|
{ifloop rel="blog.document"}
|
|
<div class="documents">
|
|
<ul>
|
|
{loop name="blog.document" type="document" folder="{$ID}"}
|
|
<li><a href="{$DOCUMENT_URL}" target="_blank">{$TITLE}</a></li>
|
|
{/loop}
|
|
</ul>
|
|
</div>
|
|
{/ifloop}
|
|
|
|
{if $POSTSCRIPTUM}
|
|
<small class="folder-postscriptum">
|
|
{$POSTSCRIPTUM}
|
|
</small>
|
|
{/if}
|
|
{/loop}
|
|
{else}
|
|
{ifloop rel="folders"}
|
|
<ul>
|
|
{loop name="folders" type="folder"}
|
|
<li class="item">
|
|
<article>
|
|
<div class="content-info">
|
|
<h2 class="name"><a href="{$URL}">{$TITLE}</a></h2>
|
|
{if $CHAPO}
|
|
<div class="short-description">
|
|
{$CHAPO}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</article>
|
|
</li>
|
|
{/loop}
|
|
</ul>
|
|
{/ifloop}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
|
|
|