From 113a913ef3eaa1ae13d92f97267f4f7aa8edd179 Mon Sep 17 00:00:00 2001 From: trendschau Date: Tue, 21 Jan 2025 19:32:21 +0100 Subject: [PATCH] Cyanine: Make List in landingpage optional --- themes/cyanine/cyanine.yaml | 28 ++++++++++++-------- themes/cyanine/landingpage.twig | 45 ++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/themes/cyanine/cyanine.yaml b/themes/cyanine/cyanine.yaml index 0a7572c..66cb7b9 100644 --- a/themes/cyanine/cyanine.yaml +++ b/themes/cyanine/cyanine.yaml @@ -894,18 +894,26 @@ forms: metatabs: meta: fields: - template: - type: select - label: Select a template - options: - standard: 'Standard' - landingpage: 'Landingpage' - shorttitle: - type: text - label: Enter a shorttitle for the landingpageInfo section fieldsetfolder: fields: glossary: type: checkbox label: 'Glossary List (cyanine theme)' - checkboxlabel: 'List pages or posts of this folder as glossary (only for folders)' \ No newline at end of file + checkboxlabel: 'List pages or posts of this folder as glossary (only for folders)' + fieldsetTemplates: + type: fieldset + legend: 'Templates' + fields: + template: + type: select + label: Select a template + options: + standard: 'Standard' + landingpage: 'Landingpage' + pagelisting: + type: checkbox + label: List Pages + checkboxlabel: List other pages of the folder below content + shorttitle: + type: text + label: Enter a shorttitle for the landingpageInfo section diff --git a/themes/cyanine/landingpage.twig b/themes/cyanine/landingpage.twig index a5a5145..593f64f 100644 --- a/themes/cyanine/landingpage.twig +++ b/themes/cyanine/landingpage.twig @@ -44,30 +44,35 @@ -
+ {{ meta.meta }} + {% if metatabs.meta.pagelisting %} - {% set pagelist = getPageList(navigation, item.thisChapter.urlRelWoF, base_url) %} +
-
    + {% set pagelist = getPageList(navigation, item.thisChapter.urlRelWoF, base_url) %} + +
      + + {% for element in pagelist.folderContent %} + + {% set page = getPageMeta(settings, element) %} + +
    • +
      +

      {{ page.meta.shorttitle }}

      +

      {{ page.meta.description }}

      +
      +
    • + + {% endfor %} - {% for element in pagelist.folderContent %} +
    - {% set page = getPageMeta(settings, element) %} +
-
  • -
    -

    {{ page.meta.shorttitle }}

    -

    {{ page.meta.description }}

    -
    -
  • - - {% endfor %} - - - -
    + {% endif %}