Created
April 3, 2018 06:59
-
-
Save davidhellmann/fbb12f5f2c731a1cfc8f5790f88aeefc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# @var craft \craft\web\twig\variables\CraftVariable #} | |
{# @var entry \craft\elements\Entry #} | |
{# -- Page Blog -- #} | |
{# ---------------------------------------------------------------------- #} | |
{% extends "_layouts/_master.html" %} | |
{% set bodyClass = "p-optical" %} | |
{# -- CRITICAL CSS -- #} | |
{% block appInlineCSS %} | |
<style> | |
{{ source (_self ~ '_critical.min.css', ignore_missing = true) }} | |
</style> | |
{% endblock %} | |
{# -- Query Entries -- #} | |
{# To Skip the Current id add: id: 'and, not ' ~ entry.id #} | |
{% set entries = craft.products({ | |
type: 'optical', | |
limit: null, | |
orderBy: 'productLabel desc, pluginPreparseNewestCollectionDate desc', | |
}) %} | |
{% paginate entries as pageInfo, pageEntries %} | |
{# -- Rel Nav -- #} | |
{% block appHeader %} | |
{% include '_partials/header/_siteHeaderLinks.html' with { | |
pageInfo: pageInfo | |
} only %} | |
{% endblock %} | |
{# -- App Content -- #} | |
{% block appContent %} | |
{# -- Cache -- #} | |
{% cache globally using key 'optical-' ~ craft.app.request.pathInfo ~ (craft.app.request.pageNum ? '/p' ~ craft.app.request.pageNum : '') %} | |
{% embed '_embeds/oneColumn/_template.html' with { | |
opt: { | |
intro: true, | |
content: true | |
}, | |
entry: entry, | |
pageEntries: pageEntries, | |
pageInfo: pageInfo | |
} only %} | |
{# -- Block: Intro -- #} | |
{% block intro %} | |
<div class="o-box o-box--large"> | |
{# -- breadcrumb -- #} | |
{% set breadCrumbLinksBlog = [ | |
{ | |
title: 'neubau' | t, | |
link: siteUrl, | |
linked: true | |
}, | |
{ | |
title: entry.title | striptags | truncate(24), | |
linked: false | |
} | |
] %} | |
{% include '_molecules/breadcrumb/_template.html' with { | |
opt: { | |
breadCrumbLinks: breadCrumbLinksBlog | |
} | |
} only %} | |
</div> | |
{# -- Include Page Title -- #} | |
<div class="o-box o-box--large"> | |
{% include '_molecules/pageTitle/_template.html' with { | |
opt: { | |
object: entry, | |
size: 'h1' | |
} | |
} only %} | |
</div> | |
{% endblock %} | |
{# -- Block: Content -- #} | |
{% block content %} | |
{# -- Cards --#} | |
{% include '_organisms/cardsProduct/_template.html' with { | |
opt: { | |
items: pageEntries, | |
pageInfo: pageInfo, | |
pagination: false, | |
paginationSimple: null | |
} | |
} only %} | |
<div class="o-box o-box--large"> | |
{# -- squarelovinSlider -- #} | |
{% include '_atoms/squarelovinSlder/_template.html' with { | |
opt: { | |
lang: craft.app.language, | |
type: 'main' | |
} | |
} only %} | |
</div> | |
{# -- stayInspired -- #} | |
{% if benefits.globalBenefits ?? null %} | |
<div class="o-box o-box--medium"> | |
{% include '_molecules/benefits/_template.html' with { | |
opt: { | |
items: benefits.globalBenefits.all() ?? null | |
} | |
} only %} | |
</div> | |
{% endif %} | |
{# -- cardsSiteEndTeasers -- #} | |
{% if entry.groupedSiteEndTeasers ?? null %} | |
<div class="o-box o-box--medium"> | |
{% include '_organisms/cardsSiteEndTeasers/_template.html' with { | |
opt: { | |
items: entry.groupedSiteEndTeasers.with( | |
[ | |
'teaser:teaserImage' | |
]).all() ?? null, | |
newsletter: true, | |
} | |
} only %} | |
</div> | |
{% endif %} | |
{% endblock %} | |
{% endembed %} | |
{# -- Cache End -- #} | |
{% endcache %} | |
{% endblock %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment