From 891a2c7d5b45c61d70a4539eacb9e73dc5b20022 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 21 Jun 2022 20:03:00 +0530 Subject: [PATCH] feat(PageBuilder): Section IDs Set IDs on sections so that you can link to them using anchor tags --- frappe/templates/includes/navbar/navbar_items.html | 6 ++++-- frappe/templates/includes/web_block.html | 4 +++- .../website/doctype/web_page_block/web_page_block.json | 9 ++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/frappe/templates/includes/navbar/navbar_items.html b/frappe/templates/includes/navbar/navbar_items.html index dbc086f1f4..309027be09 100644 --- a/frappe/templates/includes/navbar/navbar_items.html +++ b/frappe/templates/includes/navbar/navbar_items.html @@ -33,14 +33,16 @@ {% else %} {% if parent %} +{% set url = item.url or '' %} +{% set url = url if url.startswith('#') else url | abs_url %} {% else %} - {{ _(item.label) }} diff --git a/frappe/templates/includes/web_block.html b/frappe/templates/includes/web_block.html index c8b22b3551..1215df63cb 100644 --- a/frappe/templates/includes/web_block.html +++ b/frappe/templates/includes/web_block.html @@ -11,7 +11,9 @@ {%- if web_template_type == 'Section' -%} {%- if not web_block.hide_block -%} -