diff --git a/theme/base.html b/theme/base.html
index 0921b73cc6..f7a582d5a3 100644
--- a/theme/base.html
+++ b/theme/base.html
@@ -70,6 +70,20 @@
+
+ {% set related_nav_urls_map = {
+ "/api/": ["/2.18/api/"],
+ "/2.18/api/": ["/api/"],
+ "/keras_tuner/": ["/keras_hub/"],
+ "/keras_hub/": ["/keras_tuner/"],
+ } %}
+ {% set vars = {'related_urls': [], 'active_url': ''} %}
+ {% for item in nav %}
+ {% if item.active %}
+ {{ vars.update({'related_urls': related_nav_urls_map[item.url], 'active_url': item.url}) }}
+ {% endif %}
+ {% endfor %}
+