categories page done
This commit is contained in:
@@ -8,11 +8,32 @@
|
||||
{% include 'partials/tagslist.html.twig' with {'base_url':"/categories/", 'taxonomy':'tag', 'display':'inline'} %}
|
||||
</nav>
|
||||
|
||||
{% set contents = page.collection %}
|
||||
{% set taxlist = taxonomylist.get() %}
|
||||
|
||||
<div id="categories-content" class="grid">
|
||||
{% for child in page.collection %}
|
||||
<section class="projet-block projet-block-text grid-block columns large-3 medium-6 small-12">
|
||||
{% include 'partials/projet-block.html.twig' with {'page':child, 'display':'text'} %}
|
||||
</section>
|
||||
{% for tax,value in taxlist['client'] %}
|
||||
{% set posts = taxonomy.findTaxonomy({'client':tax}) %}
|
||||
|
||||
{% set disposts = {} %}
|
||||
{% for p,v in posts %}
|
||||
{% if v in contents %}
|
||||
{% set disposts = disposts|merge({(p):v}) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if disposts|length %}
|
||||
<section class="client-block client-block-text grid-block columns large-3 medium-6 small-12">
|
||||
<h3>{{ tax }}</h3>
|
||||
<ul>
|
||||
{% for post in disposts %}
|
||||
<li class="project">
|
||||
{% include 'partials/projet-block.html.twig' with {'page':post,'display':'text'} %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% for child in page.collection %}
|
||||
{% if child.header.home == true %}
|
||||
<section class="projet-block projet-block-img grid-block columns xlarge-3 large-4 medium-6 small-12">
|
||||
{% include 'partials/projet-block.html.twig' with {'page':child,'display':'img'} %}
|
||||
{% include 'partials/projet-block.html.twig' with {'page':child,'display':'img', 'context':'home'} %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{% if display == 'img' %}
|
||||
{% set image = page.media.images|first %}
|
||||
|
||||
{# {% set image = child.media.files|first %} #}
|
||||
{# {% if image == null %} #}
|
||||
{# {% set image = child.media.images|first %} #}
|
||||
{# {% endif %} #}
|
||||
{% set image = page.media['00-home.jpg'] %}
|
||||
{% if image == null %}
|
||||
{% set image = page.media.images|first %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ page.url }}">{{ image.resize(500).html }}</a>
|
||||
<header>
|
||||
@@ -14,12 +13,10 @@
|
||||
{% endif %}
|
||||
|
||||
{% if display == 'text' %}
|
||||
<h1><a href="{{ page.url }}">{{page.title}}</a></h1>
|
||||
<h2>{{page.header.subtitle}}</h2>
|
||||
|
||||
{{ page.summary() }}
|
||||
|
||||
{% set image = page.media.images|first %}
|
||||
<h4><a href="{{ page.url }}">{{page.title}} - {{page.date|date("Y")}}</a></h4>
|
||||
{% set image = page.media['00-cat.jpg'] %}
|
||||
{% if image == null %}
|
||||
{% set image = page.media.images|first %}
|
||||
{% endif %}
|
||||
<a class="projet-img" href="{{ page.url }}">{{ image.resize(500).html }}</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user