diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html
index e9a956f9..f5979e2c 100644
--- a/sphinx_rtd_theme/layout.html
+++ b/sphinx_rtd_theme/layout.html
@@ -159,7 +159,7 @@
{# PAGE CONTENT #}
- {% if (theme_style_external_links == 'True') %}
+ {% if theme_style_external_links|tobool %}
{% else %}
@@ -207,7 +207,7 @@
{% endif %}
{# STICKY NAVIGATION #}
- {% if theme_sticky_navigation %}
+ {% if theme_sticky_navigation|tobool %}