From e3e3834c029a841375a55f8332c7b5b9deacc52f Mon Sep 17 00:00:00 2001 From: Kevin Chu Date: Wed, 13 Feb 2019 12:32:48 -0800 Subject: [PATCH] MERC-4566 Add option to hide breadcrumbs and page title --- config.json | 5 +++ schema.json | 34 ++++++++++++++++++++ templates/components/common/breadcrumbs.html | 20 ++++++------ templates/pages/blog.html | 4 ++- templates/pages/category.html | 4 ++- templates/pages/contact-us.html | 4 ++- templates/pages/page.html | 5 +-- 7 files changed, 62 insertions(+), 14 deletions(-) diff --git a/config.json b/config.json index 93f646012b..b920b3fb8f 100644 --- a/config.json +++ b/config.json @@ -43,6 +43,11 @@ "Firefox ESR" ], "settings": { + "page_heading": false, + "breadcrumbs": false, + "blog_page_heading": false, + "category_page_heading": false, + "contact_us_page_heading": false, "homepage_new_products_count": 5, "homepage_featured_products_count": 4, "homepage_top_products_count": 4, diff --git a/schema.json b/schema.json index 980dae5782..9b9933cee6 100644 --- a/schema.json +++ b/schema.json @@ -356,6 +356,40 @@ "label": "Product thumbnail loading background", "id": "container-fill-base" }, + { + "type": "heading", + "content": "Pages" + }, + { + "type": "checkbox", + "label": "Hide breadcrumbs", + "force_reload": true, + "id": "breadcrumbs" + }, + { + "type": "checkbox", + "label": "Hide page heading", + "force_reload": true, + "id": "page_heading" + }, + { + "type": "checkbox", + "label": "Hide category page heading", + "force_reload": true, + "id": "category_page_heading" + }, + { + "type": "checkbox", + "label": "Hide blog page heading", + "force_reload": true, + "id": "blog_page_heading" + }, + { + "type": "checkbox", + "label": "Hide contact-us page heading", + "force_reload": true, + "id": "contact_us_page_heading" + }, { "type": "heading", "content": "Products" diff --git a/templates/components/common/breadcrumbs.html b/templates/components/common/breadcrumbs.html index 95e4ecd4be..2afdc276c4 100644 --- a/templates/components/common/breadcrumbs.html +++ b/templates/components/common/breadcrumbs.html @@ -1,13 +1,15 @@ diff --git a/templates/pages/blog.html b/templates/pages/blog.html index ab68748def..310e98431a 100644 --- a/templates/pages/blog.html +++ b/templates/pages/blog.html @@ -10,7 +10,9 @@ {{> components/common/breadcrumbs breadcrumbs=breadcrumbs}}
-

{{ blog.name }}

+ {{#or (if ../theme_settings.blog_page_heading '!==' true)}} +

{{ blog.name }}

+ {{/or}} {{#each blog.posts}} {{> components/blog/post post=this}} diff --git a/templates/pages/category.html b/templates/pages/category.html index a39e49a5e2..e9ab91cc32 100644 --- a/templates/pages/category.html +++ b/templates/pages/category.html @@ -20,7 +20,9 @@ {{#if category.image}} {{/if}} -

{{category.name}}

+{{#or (if ../theme_settings.category_page_heading '!==' true)}} +

{{category.name}}

+{{/or}} {{{category.description}}} {{{snippet 'categories'}}}
diff --git a/templates/pages/contact-us.html b/templates/pages/contact-us.html index b0e47e5b73..d5b2b68b13 100644 --- a/templates/pages/contact-us.html +++ b/templates/pages/contact-us.html @@ -4,7 +4,9 @@
-

{{page.title}}

+ {{#or (if ../theme_settings.contact_us_page_heading '!==' true)}} +

{{page.title}}

+ {{/or}} {{#if page.sub_pages}}