Skip to content

Commit 4c2194a

Browse files
authored
Chore: hide sub nav for 404 page (#6622)
* Chore: hide sub nav for 404 page Signed-off-by: thisisobate <obasiuche62@gmail.com> * fix: add custom 404 template override to hide sticky sub-nav Signed-off-by: thisisobate <obasiuche62@gmail.com> --------- Signed-off-by: thisisobate <obasiuche62@gmail.com>
1 parent 2c436b5 commit 4c2194a

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

overrides/404.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% extends "main.html" %}
2+
{% block header %}
3+
{% set is_404_page = true %}
4+
{% include "partials/header.html" %}
5+
{% endblock %}
6+
7+
{% block tabs %}
8+
{% endblock %}
9+
10+
{% block content %}
11+
<h1>404 - Not found</h1>
12+
{% endblock %}

overrides/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
</nav>
144144

145145
<!-- Sub Navigation tabs (sticky) -->
146-
{% if not page.is_homepage %}
146+
{% if not page.is_homepage and not (is_404_page | default(false)) %}
147147
{% if "navigation.tabs.sticky" in features %}
148148
{% if "navigation.tabs" in features %}
149149
{% include "partials/tabs.html" %}

0 commit comments

Comments
 (0)