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
85 lines
2.6 KiB
HTML
Executable File
85 lines
2.6 KiB
HTML
Executable File
{extends file="layout.tpl"}
|
|
|
|
{block name='init'}
|
|
{assign var="content_id" value={content attr="id"}}
|
|
{/block}
|
|
|
|
{* Body Class *}
|
|
{block name="body-class"}page-content{/block}
|
|
|
|
{* Page Title *}
|
|
{block name='no-return-functions' append}
|
|
{if {$content_id}}
|
|
{loop name="content.seo.title" type="content" id={$content_id} limit="1"}
|
|
{$page_title = {$META_TITLE}}
|
|
{/loop}
|
|
{/if}
|
|
{/block}
|
|
|
|
{* Meta *}
|
|
{block name="meta"}
|
|
{if $content_id}
|
|
{loop name="content.seo.meta" type="content" id=$content_id limit="1"}
|
|
{include file="includes/meta-seo.html"}
|
|
{/loop}
|
|
{/if}
|
|
{/block}
|
|
|
|
{* Breadcrumb *}
|
|
{block name='no-return-functions' append}
|
|
{if $content_id}
|
|
{$breadcrumbs = []}
|
|
{loop type="content" name="content-breadcrumb" id=$content_id limit="1"}
|
|
{loop name="folder_path" type="folder-path" folder="{$DEFAULT_FOLDER}"}
|
|
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
|
{/loop}
|
|
{$breadcrumbs[] = ['title' => {$TITLE}, 'url'=> {$URL}]}
|
|
{/loop}
|
|
{/if}
|
|
{/block}
|
|
|
|
{block name="main-content"}
|
|
{if $content_id}
|
|
<div class="main layout-col-1">
|
|
<article id="content-main" class="col-main" role="main" aria-labelledby="main-label">
|
|
{loop name="blog.content" type="content" id=$content_id limit="1"}
|
|
<h1 id="main-label" class="page-header">{$TITLE}</h1>
|
|
{if $CHAPO}
|
|
<div class="chapo">
|
|
{$CHAPO}
|
|
</div>
|
|
{/if}
|
|
{if $DESCRIPTION}
|
|
<div class="description">
|
|
{$DESCRIPTION nofilter}
|
|
</div>
|
|
{/if}
|
|
|
|
{ifloop rel="blog.document"}
|
|
<div class="documents">
|
|
<ul>
|
|
{loop name="blog.document" type="document" content="{$ID}"}
|
|
<li><a href="{$DOCUMENT_URL}" target="_blank">{$TITLE}</a></li>
|
|
{/loop}
|
|
</ul>
|
|
</div>
|
|
{/ifloop}
|
|
|
|
{if $POSTSCRIPTUM}
|
|
<small class="postscriptum">
|
|
{$POSTSCRIPTUM}
|
|
</small>
|
|
{/if}
|
|
{/loop}
|
|
</article>
|
|
|
|
</div><!-- /.layout -->
|
|
{else}
|
|
<div class="main">
|
|
<article id="content-main" class="col-main" role="main" aria-labelledby="main-label">
|
|
{include file="includes/empty.html"}
|
|
</article>
|
|
</div><!-- /.layout -->
|
|
{/if}
|
|
{/block}
|