I am using the code in the template files (.html.twig): page.find ()
, e.g.
{% set page = page.find ('/_widgets/_about') %}
Everything seemed fine, but I noticed on the 404 error page that the page object is null.
So I changed the code from page.find()
to pages.find()
and everything started working on both the normal pages and the 404 error page.
So what’s the difference between page.find()
and pages.find()
?
In the documentation, there are both versions in the sample codes.