From 2a011010a9065583673b5d784c6ed1921e3b0299 Mon Sep 17 00:00:00 2001 From: Keshav Anand Date: Wed, 1 Apr 2026 23:18:02 +0530 Subject: [PATCH] feat: block PDP and collection templates via metaobject --- layout/theme.liquid | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/layout/theme.liquid b/layout/theme.liquid index a4f874f..e9b16b5 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -1,6 +1,17 @@ + {% liquid + # Block templates via metaobject (strict match) + assign blocked = shop.metaobjects.access_control.global.blocked_templates.value + + for type in blocked + if type == template.type + echo '' + break + endif + endfor + %} @@ -256,7 +267,6 @@ {{ 'base.css' | asset_url | stylesheet_tag }} {{ 'custom-styles.css' | asset_url | stylesheet_tag }} - {%- unless settings.type_body_font.system? -%} {% comment %}theme-check-disable AssetPreload{% endcomment %} @@ -287,10 +297,9 @@ document.documentElement.classList.add('shopify-design-mode'); } - - {{ 'design-pack-styles.css' | asset_url | stylesheet_tag }} - - + + {{ 'design-pack-styles.css' | asset_url | stylesheet_tag }} + @@ -366,6 +375,5 @@ {% if template.suffix == 'members' %} {% render 'for-hire-btn' %} {% endif %} -