-
Notifications
You must be signed in to change notification settings - Fork 7
/
product_page.njk
35 lines (25 loc) · 1021 Bytes
/
product_page.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
business: retail
---
{% extends "./base.njk" %}
{# Ideally set through eleventyComputed in front-matter but not working. Bug? #}
{% set title = product.title %}
{% set description = product.summary or product.description %}
{% set keywords = product.keywords %}
{% set image = product.social_image or product.image %}
{% block main %}
{% include "section_product_page_hero.njk" %}
{% for i in range(0, product.layout | length) %}
{% set item = product.layout[i] %}
{# The section mid_summary uses the main product description as it's main-text #}
{% if item.section === "mid_summary" %}
{% set item = product.layout[i]|mergeObjectFilter({main_text: product.description}) %}
{% endif %}
{% set component = "section_" + item.section + ".njk" %}
{% include component %}
{% endfor %}
{# Signup Form Section #}
{% set form = { type: "retail", referrername: "retail_" + product.name | slug } %}
{% include "section_signup_form.njk" %}
{% include "section_contact_icon.njk" %}
{% endblock %}