diff --git a/doc/_templates/breadcrumbs.html b/doc/_templates/breadcrumbs.html
index e585169259b..42d657a1537 100644
--- a/doc/_templates/breadcrumbs.html
+++ b/doc/_templates/breadcrumbs.html
@@ -5,7 +5,7 @@
{% block breadcrumbs_aside %}
{% if hasdoc(pagename) %}
- {% if pagename.startswith("api/generated") or suffix == ".ipynb" %}
+ {% if pagename.startswith("api/generated") or page_source_suffix == ".ipynb" %}
{% set title = "Suggested improvement for " + pagename %}
{% set body = "Please describe what could be improved about this page or the typo/mistake that you found:" %}
Improve this page
{% else %}
- Improve this page
{% endif %}
{% endif %}