From e53f8184b0c4851f2b1699f449a50243be463ff7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 23 Mar 2020 18:09:06 +0100 Subject: [PATCH] + 3 more offer fields --- content/u/products/demo-product/contents.lr | 53 +++++++++++++++++++-- models/product.ini | 36 ++++++++++++++ templates/product.html | 41 ++++++++++++++++ 3 files changed, 125 insertions(+), 5 deletions(-) diff --git a/content/u/products/demo-product/contents.lr b/content/u/products/demo-product/contents.lr index 37f9450..1b53763 100644 --- a/content/u/products/demo-product/contents.lr +++ b/content/u/products/demo-product/contents.lr @@ -6,15 +6,40 @@ title: Demo product --- subtitle: Using all possible fields --- -description1: This is the first markdown description block +description1: + +## This is the first markdown description block + +Description content + --- -description2: This is the second markdown description block +description2: + +## This is the second markdown description block + +Description content + --- -description3: This is the third markdown description block +description3: + +## This is the third markdown description block + +Description content + --- -description4: This is the fourth markdown description block +description4: + +## This is the fourth markdown description block + +Description content + --- -description5: This is the fifth markdown description block +description5: + +## This is the fifth markdown description block + +Description content + --- link: https://link-to-the-real-product.ch --- @@ -56,6 +81,24 @@ offer3_text: The text for the third offer --- offer3_link: https://ungleich.ch --- +offer4_title: Title of 4. offer +--- +offer4_text: The text for the third offer +--- +offer4_link: https://ungleich.ch +--- +offer5_title: Title of 5. offer +--- +offer5_text: The text for the third offer +--- +offer5_link: https://ungleich.ch +--- +offer6_title: Title of 6. offer +--- +offer6_text: The text for the third offer +--- +offer6_link: https://ungleich.ch +--- description: The real field [Nico](https://www.nico.schottelius.org) wants to use! --- diff --git a/models/product.ini b/models/product.ini index be8906d..62f3af2 100644 --- a/models/product.ini +++ b/models/product.ini @@ -138,6 +138,42 @@ type = markdown label = Offer 3 Link type = url +[fields.offer4_title] +label = Offer 4 Title +type = string + +[fields.offer4_text] +label = Offer 4 Text +type = markdown + +[fields.offer4_link] +label = Offer 4 Link +type = url + +[fields.offer5_title] +label = Offer 5 Title +type = string + +[fields.offer5_text] +label = Offer 5 Text +type = markdown + +[fields.offer5_link] +label = Offer 5 Link +type = url + +[fields.offer6_title] +label = Offer 6 Title +type = string + +[fields.offer6_text] +label = Offer 6 Text +type = markdown + +[fields.offer6_link] +label = Offer 6 Link +type = url + [fields.image] label = Index Image type = url diff --git a/templates/product.html b/templates/product.html index 74015d7..1ce693f 100644 --- a/templates/product.html +++ b/templates/product.html @@ -119,6 +119,47 @@ + +
+
+
+ {% if this.offer4_title and this.offer4_text and this.offer4_link %} +
+
+
{{ this.offer4_title }}
+

{{ this.offer4_text }}

+ Order +
+
+ {% endif %} +
+
+ {% if this.offer5_title and this.offer5_text and this.offer5_link %} +
+
+
{{ this.offer5_title }}
+

{{ this.offer5_text }}

+ Order +
+
+ {% endif %} +
+
+ {% if this.offer6_title and this.offer6_text and this.offer6_link %} +
+
+
{{ this.offer6_title }}
+

{{ this.offer6_text }}

+ Order +
+
+ {% endif %} +
+
+
+
+ + {% if this.description5 %}