{extends file='page.tpl'}

{block name='page_header_container'}{/block}
{block name='head_seo_title'} {$page.meta.title} - {$chpost.post_title} {/block}

{block name='head' append}
    <meta property="og:url"                content="{$urls.current_url}" />
    <meta property="og:type"               content="article" />
    <meta property="og:title"              content="{$page.meta.title} - {$chpost.post_title}" />
    <meta property="og:description"        content="{$chpost.meta_description nofilter}" />
	{if isset($chpost.gallery_lists) & !empty($chpost.gallery_lists) }
		{$firstData = $chpost.gallery_lists|reset}
		<meta property="og:image"          content="{$urls.shop_domain_url}{$firstData.gallery_default}" />
	{elseif isset($chpost.post_img.post_default) }
		<meta property="og:image"          content="{$urls.shop_domain_url}{$chpost.post_img.post_default}" />
	{/if}
   
{/block}

{block name="page_content_container"}
	<section id="content" class="page-content">
		<div class="chcreateur_post single">
			<div class="chcreateur_post_inner">
				<article id="blog_post" class="blog_post">
					<div class="blog_post_content">
						<div class="blog_post_content_top">
							<div class="post_thumbnail">
								
								{if isset($chpost.video) & !empty($chpost.video)}
									{if $chpost.video|@count > 1 }
										{assign var="class" value='newSlide owl-carousel'}
									{else}
										{assign var="class" value=''}
									{/if}
									{include file="module:chcreateur/views/templates/front/post-video.tpl" postvideos=$chpost.video width='870' height="482" class=$class arrow="1"}
								{elseif isset($chpost.audio) & !empty($chpost.audio) }
									{if $chpost.audio|@count > 1 }
										{assign var="class" value='newSlide owl-carousel'}
									{else}
										{assign var="class" value=''}
									{/if}
									{include file="module:chcreateur/views/templates/front/post-audio.tpl" postaudio=$chpost.audio width='870' height="482" class=$class arrow="1"}
								{elseif isset($chpost.gallery_lists) & !empty($chpost.gallery_lists) }
									{if $chpost.gallery_lists|@count > 1 }
										{assign var="class" value=''}
									{else}
										{assign var="class" value='responsive'}
									{/if}
									{include file="module:chcreateur/views/templates/front/post-gallery.tpl" gallery_lists=$chpost.gallery_lists imagesize="gallery_default" class=$class arrow="1"}
								{else}
									<img class="chselection_img img-responsive" src="{$chpost.post_img.post_default}" alt="{$chpost.post_title}">
								{/if}
								
							</div>
						</div>

						<div class="blog_post_content_bottom">
							<h1 class="post_title">{$chpost.post_title}</h1>
							<p class="excerpt">{$chpost.post_excerpt}</p>
	
							<div class="post_content">
								{$chpost.post_content nofilter}
							</div>
						</div>

						{if isset($chpost.related_products)}
							<section class="featured-products clearfix">
								{*<h2>{l s='Viewed products' d='Modules.Viewedproduct.Shop'}</h2>*}
								{assign var="larg" value=$chpost.related_products|@count}
								<div class="products">
						
									{foreach from=$chpost.related_products item="product"}
										<div class="blog_product col-lg-3">
											{include file="catalog/_partials/miniatures/product.tpl" product=$product}
										</div>
									{/foreach}
								</div>
							</section>
						{/if}
					<div class="trait dernier"></div>
					</div>
				</article>
			</div>
		</div>
		{include file="module:chcreateur/views/templates/front/custom-nav.tpl"}
	</section>
{*
{if ($chpost.comment_status == 'open') || ($chpost.comment_status == 'close')}
	{include file="module:chcreateur/views/templates/front/comment-list.tpl"}
{/if}
{if (isset($disable_blog_com) && $disable_blog_com == 1) && ($chpost.comment_status == 'open')}
	
	{include file="module:chcreateur/views/templates/front/comment.tpl"}
{/if}
*}

{/block}
{*
{block name="left_column"}
	{assign var="layout_column" value=$layout|replace:'layouts/':''|replace:'.tpl':''|strval}
	{if ($layout_column == 'layout-left-column')}
		<div id="left-column" class="sidebar col-xs-12 col-sm-4 col-md-3">
			{if ($chselection_column_use == 'default_ps')}
				{hook h="displaychselectionleft"}
			{else}
				{hook h="displayLeftColumn"}
			{/if}
		</div>
	{/if}
{/block}
{block name="right_column"}
	{assign var="layout_column" value=$layout|replace:'layouts/':''|replace:'.tpl':''|strval}
	{if ($layout_column == 'layout-right-column')}
		<div id="right-column" class="sidebar col-xs-12 col-sm-4 col-md-3">
			{if ($chselection_column_use == 'own_ps')}
				{hook h="displaychselectionright"}
			{else}
				{hook h="displayRightColumn"}
			{/if}
		</div>
	{/if}
{/block}
*}

