Twig \ Error \ RuntimeError
The "batch" filter expects an array or "Traversable", got "NULL". Twig\Error\RuntimeError thrown with message "The "batch" filter expects an array or "Traversable", got "NULL"." Stacktrace: #36 Twig\Error\RuntimeError in /home/server926745/ftp/aprzeszow/wp-content/themes/g5_helium/custom/particles/gallery-feature.html.twig:145 #35 twig_array_batch in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/ba/ba9a6c65dad481df68dd6bf3ad23ff8c492e3c36a17d724b07d46de70353a9b6.php:469 #34 __TwigTemplate_2e896eb952ecae55fba0662d0b470b23c047a93b6999e18351d33094bcc20aa7:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #33 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #32 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/8f/8f4346b4692eeda573f7d30518cf6cb1be404458961912ab65c1eaac550fb3fc.php:71 #31 __TwigTemplate_15273282dd97d29fe4cbc545f7ac109f9eecabaaad0664b176fb5bd74504d1f7:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #30 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #29 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/da/da244382e7af7ece22174eae2e88620c6d8be8bb02310847f1d40a784b0d123e.php:75 #28 __TwigTemplate_b5de73caee82875909245ceae3caf72060fb7b2d024aa3b285bc43bf54062947:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #27 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #26 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/5d/5d0ea002fca522959006f9fb029d3e7918122009386e94fe08791634eccd03b4.php:58 #25 __TwigTemplate_0d93b7cc09f76800ff91d160f3296d2ec1d74b164523521be6d25a4209bfcc43:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #24 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #23 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/3b/3b940596d8325737edda1927465106e74fc83919b90c02abfb7d8571f95da85b.php:71 #22 __TwigTemplate_12be9f667bd86212c29cd2219f813312f450fea26ebc803bc57c0721f87e41df:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #21 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #20 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/4c/4c7ea40896d2810ebb91659de659d5a1321775bdbd64194ef6328d48e2cf002a.php:201 #19 __TwigTemplate_87a5eb470d77c0c1a564f636e63b498ca4debfd831f7ce7874eb552fdaf905aa:block_page_layout in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:216 #18 Twig\Template:displayBlock in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/4c/4c7ea40896d2810ebb91659de659d5a1321775bdbd64194ef6328d48e2cf002a.php:88 #17 __TwigTemplate_87a5eb470d77c0c1a564f636e63b498ca4debfd831f7ce7874eb552fdaf905aa:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #16 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #15 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/58/58050cd8c647d2b8bdba15beb1b4578071c9bd1299b389c3ceb613fbfde88775.php:36 #14 __TwigTemplate_3ca68c6e17eceb487d9d9a74049a0b9505c2fdc0c7d5b7f5e134e7e306ed467e:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #13 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #12 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/88/883b5e5b848f1ac7730bd878361a18ca4e9e5dbbe0520f6b534dd625d8eaf81e.php:40 #11 __TwigTemplate_420435a301f78521e85a7fc725fa699ec9de5f6af9f7ecb01e52c16811146c35:doDisplay in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #10 Twig\Template:displayWithErrorHandling in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #9 Twig\Template:display in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #8 Twig\Template:render in /home/server926745/ftp/aprzeszow/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #7 Twig\TemplateWrapper:render in /home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Loader.php:79 #6 Timber\Loader:render in /home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Timber.php:334 #5 Timber\Timber:compile in /home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Timber.php:383 #4 Timber\Timber:fetch in /home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Timber.php:410 #3 Timber\Timber:render in /home/server926745/ftp/aprzeszow/wp-content/themes/g5_helium/page.php:41 #2 include in /home/server926745/ftp/aprzeszow/wp-includes/template-loader.php:106 #1 require_once in /home/server926745/ftp/aprzeszow/wp-blog-header.php:19 #0 require in /home/server926745/ftp/aprzeszow/index.php:17
Stack frames (37)
36
Twig\Error\RuntimeError
/home/server926745/ftp/aprzeszow/wp-content/themes/g5_helium/custom/particles/gallery-feature.html.twig145
35
twig_array_batch
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/ba/ba9a6c65dad481df68dd6bf3ad23ff8c492e3c36a17d724b07d46de70353a9b6.php469
34
__TwigTemplate_2e896eb952ecae55fba0662d0b470b23c047a93b6999e18351d33094bcc20aa7 doDisplay
/vendor/twig/twig/src/Template.php455
33
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
32
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/8f/8f4346b4692eeda573f7d30518cf6cb1be404458961912ab65c1eaac550fb3fc.php71
31
__TwigTemplate_15273282dd97d29fe4cbc545f7ac109f9eecabaaad0664b176fb5bd74504d1f7 doDisplay
/vendor/twig/twig/src/Template.php455
30
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
29
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/da/da244382e7af7ece22174eae2e88620c6d8be8bb02310847f1d40a784b0d123e.php75
28
__TwigTemplate_b5de73caee82875909245ceae3caf72060fb7b2d024aa3b285bc43bf54062947 doDisplay
/vendor/twig/twig/src/Template.php455
27
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
26
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/5d/5d0ea002fca522959006f9fb029d3e7918122009386e94fe08791634eccd03b4.php58
25
__TwigTemplate_0d93b7cc09f76800ff91d160f3296d2ec1d74b164523521be6d25a4209bfcc43 doDisplay
/vendor/twig/twig/src/Template.php455
24
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
23
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/3b/3b940596d8325737edda1927465106e74fc83919b90c02abfb7d8571f95da85b.php71
22
__TwigTemplate_12be9f667bd86212c29cd2219f813312f450fea26ebc803bc57c0721f87e41df doDisplay
/vendor/twig/twig/src/Template.php455
21
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
20
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/4c/4c7ea40896d2810ebb91659de659d5a1321775bdbd64194ef6328d48e2cf002a.php201
19
__TwigTemplate_87a5eb470d77c0c1a564f636e63b498ca4debfd831f7ce7874eb552fdaf905aa block_page_layout
/vendor/twig/twig/src/Template.php216
18
Twig\Template displayBlock
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/4c/4c7ea40896d2810ebb91659de659d5a1321775bdbd64194ef6328d48e2cf002a.php88
17
__TwigTemplate_87a5eb470d77c0c1a564f636e63b498ca4debfd831f7ce7874eb552fdaf905aa doDisplay
/vendor/twig/twig/src/Template.php455
16
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
15
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/58/58050cd8c647d2b8bdba15beb1b4578071c9bd1299b389c3ceb613fbfde88775.php36
14
__TwigTemplate_3ca68c6e17eceb487d9d9a74049a0b9505c2fdc0c7d5b7f5e134e7e306ed467e doDisplay
/vendor/twig/twig/src/Template.php455
13
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
12
Twig\Template display
/home/server926745/ftp/aprzeszow/wp-content/cache/gantry5/g5_helium/twig/88/883b5e5b848f1ac7730bd878361a18ca4e9e5dbbe0520f6b534dd625d8eaf81e.php40
11
__TwigTemplate_420435a301f78521e85a7fc725fa699ec9de5f6af9f7ecb01e52c16811146c35 doDisplay
/vendor/twig/twig/src/Template.php455
10
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
9
Twig\Template display
/vendor/twig/twig/src/Template.php434
8
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php47
7
Twig\TemplateWrapper render
/home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Loader.php79
6
Timber\Loader render
/home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Timber.php334
5
Timber\Timber compile
/home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Timber.php383
4
Timber\Timber fetch
/home/server926745/ftp/aprzeszow/wp-content/plugins/timber-library/lib/Timber.php410
3
Timber\Timber render
/home/server926745/ftp/aprzeszow/wp-content/themes/g5_helium/page.php41
2
include
/home/server926745/ftp/aprzeszow/wp-includes/template-loader.php106
1
require_once
/home/server926745/ftp/aprzeszow/wp-blog-header.php19
0
require
/home/server926745/ftp/aprzeszow/index.php17
                    {% set attr_extra_item = '' %}
                    {% for extra in item.extra %}
                        {% set attr_extra_item = attr_extra_item ~ ' ' ~ extra|keys|first|e ~ '="' ~ extra|values|first|e('html_attr') ~ '"' %}
                    {% endfor %}
                    {% if item.image %}
                        <div class="g-gallery-feature-item{% if item.class %} {{ item.class|e }}{% endif %}" {% if item.extra %}{{ attr_extra_item|raw }}{% endif %}>
                            <a class="uk-overlay uk-overlay-hover" href="{{ images[loop.index] }}" {% if item.title %}title="{{ item.title|e }}"{% endif %} data-uk-lightbox="{group:'{{ galleryid }}'}">
                                <span class="uk-overlay-panel uk-overlay-background uk-overlay-icon uk-overlay-fade"></span>
                                <img alt="{{ item.alt|e }}" src="{{ images[loop.index] }}" {{ item.image|imagesize|raw }}>
                            </a>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endfor %}
        </div>
        {% endif %}
 
    {% else %}
        <div class="uk-grid-width-small-1-2 uk-grid-width-medium-1-2 uk-grid-width-large-1-{{ particle.columns|default('3')|e }}" data-uk-grid="{ {% if particle.gutter|default('enabled') == 'enabled' %}gutter: {{ particle.guttervalue }} {% endif %} }">
            {% for row in particle.items|batch(particle.columns|default('3')|e) %}
                {% for item in row %}
                    {% set attr_extra_item = '' %}
                    {% for extra in item.extra %}
                        {% set attr_extra_item = attr_extra_item ~ ' ' ~ extra|keys|first|e ~ '="' ~ extra|values|first|e('html_attr') ~ '"' %}
                    {% endfor %}
                    {% if item.image %}
                        <div class="g-gallery-feature-item{% if item.class %} {{ item.class|e }}{% endif %}" {% if item.extra %}{{ attr_extra_item|raw }}{% endif %}>
                            <a class="uk-overlay uk-overlay-hover" href="{{ url(item.image|shortcodes, false, 0) }}" {% if item.title %}title="{{ item.title|e }}"{% endif %} data-uk-lightbox="{group:'{{ galleryid }}'}">
                                <span class="uk-overlay-panel uk-overlay-background uk-overlay-icon uk-overlay-fade"></span>
                                {% set baseurl = url(item.image) %}
                                {% set imgurl = function('cleanimageurl', baseurl) %}
                                {% set imgurl = function('cleanimageurl', baseurl|replace({'%20':' '})) %}
                                <div>
                                    <img alt="{{ item.alt|e }}" src="{{  imgurl|resize(300) }}" {{ item.image|imagesize|raw }}>
                                </div>
                            </a>
                        </div>
                    {% endif %}
                {% endfor %}
            {% endfor %}
        ";
            }
            // line 142
            echo "
    ";
        } else {
            // line 144
            echo "        <div class=\"uk-grid-width-small-1-2 uk-grid-width-medium-1-2 uk-grid-width-large-1-";
            echo twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "columns", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "columns", []), "3")) : ("3")));
            echo "\" data-uk-grid=\"{ ";
            if (((($this->getAttribute(($context["particle"] ?? null), "gutter", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "gutter", []), "enabled")) : ("enabled")) == "enabled")) {
                echo "gutter: ";
                echo $this->getAttribute(($context["particle"] ?? null), "guttervalue", []);
                echo " ";
            }
            echo " }\">
            ";
            // line 145
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(twig_array_batch($this->getAttribute(($context["particle"] ?? null), "items", []), twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "columns", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "columns", []), "3")) : ("3")))));
            foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
                // line 146
                echo "                ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($context["row"]);
                foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                    // line 147
                    echo "                    ";
                    $context["attr_extra_item"] = "";
                    // line 148
                    echo "                    ";
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["item"], "extra", []));
                    foreach ($context['_seq'] as $context["_key"] => $context["extra"]) {
                        // line 149
                        echo "                        ";
                        $context["attr_extra_item"] = (((((($context["attr_extra_item"] ?? null) . " ") . twig_escape_filter($this->env, twig_first($this->env, twig_get_array_keys_filter($context["extra"])))) . "=\"") . twig_escape_filter($this->env, twig_first($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->valuesFilter($context["extra"])), "html_attr")) . "\"");
                        // line 150
                        echo "                    ";
                    }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                    echo "            ";
                    $context["particle"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "getJoined", [0 => ("particles." . $this->getAttribute(($context["segment"] ?? null), "subtype", [])), 1 => $this->getAttribute(($context["segment"] ?? null), "attributes", [])], "method");
                    // line 10
                    echo "        ";
                }
                // line 11
                echo "    ";
            }
            // line 12
            echo "
    ";
            // line 13
            ob_start(function () { return ''; });
            // line 14
            echo "        ";
            if ((($context["enabled"] ?? null) && ((null === $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])) || $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])))) {
                // line 15
                echo "            ";
                $this->loadTemplate([0 => (("particles/" . $this->getAttribute(($context["segment"] ?? null), "subtype", [])) . ".html.twig"), 1 => (("@particles/" . $this->getAttribute(                // line 16
($context["segment"] ?? null), "subtype", [])) . ".html.twig"), 2 => "@nucleus/content/missing.html.twig"], "@nucleus/content/particle.html.twig", 15)->display($context);
                // line 18
                echo "        ";
            }
            // line 19
            echo "    ";
            $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 20
            echo "    ";
            $context["html"] = twig_trim_filter(($context["html"] ?? null));
            // line 21
            echo "
    ";
            // line 22
            $context["classes"] = twig_trim_filter(((( !($context["inContent"] ?? null)) ? ("g-content g-particle ") : ("g-particle ")) . twig_join_filter($this->getAttribute(($context["segment"] ?? null), "classes", []), " ")));
            // line 23
            if (($context["html"] ?? null)) {
                // line 24
                if ($this->getAttribute(($context["gantry"] ?? null), "debug", [])) {
                    echo "<!-- START PARTICLE ";
                    echo ($context["id"] ?? null);
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                $length = count($context['_seq']);
                $context['loop']['revindex0'] = $length - 1;
                $context['loop']['revindex'] = $length;
                $context['loop']['length'] = $length;
                $context['loop']['last'] = 1 === $length;
            }
            foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
                // line 10
                echo "            ";
                if ($this->getAttribute($context["segment"], "content", [])) {
                    // line 11
                    echo "                ";
                    echo $this->getAttribute($context["segment"], "content", []);
                    echo "
            ";
                } else {
                    // line 13
                    echo "                ";
                    $this->loadTemplate([0 => (("@nucleus/content/" . $this->getAttribute($context["segment"], "type", [])) . ".html.twig"), 1 => (("@nucleus/layout/" . $this->getAttribute($context["segment"], "type", [])) . ".html.twig")], "@nucleus/layout/block.html.twig", 13)->display(twig_array_merge($context, ["segments" => $this->getAttribute($context["segment"], "children", [])]));
                    // line 14
                    echo "            ";
                }
                // line 15
                echo "        ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
                if (isset($context['loop']['length'])) {
                    --$context['loop']['revindex0'];
                    --$context['loop']['revindex'];
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 16
            echo "    ";
        }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
            echo "        ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
            $context['loop'] = [
              'parent' => $context['_parent'],
              'index0' => 0,
              'index'  => 1,
              'first'  => true,
            ];
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                $length = count($context['_seq']);
                $context['loop']['revindex0'] = $length - 1;
                $context['loop']['revindex'] = $length;
                $context['loop']['length'] = $length;
                $context['loop']['last'] = 1 === $length;
            }
            foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
                // line 7
                echo "            ";
                $this->loadTemplate((("@nucleus/layout/" . $this->getAttribute($context["segment"], "type", [])) . ".html.twig"), "@nucleus/layout/grid.html.twig", 7)->display(twig_array_merge($context, ["segments" => $this->getAttribute($context["segment"], "children", [])]));
                // line 8
                echo "        ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
                if (isset($context['loop']['length'])) {
                    --$context['loop']['revindex0'];
                    --$context['loop']['revindex'];
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 9
            echo "    ";
        }
        $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 12
        if (twig_trim_filter(($context["html"] ?? null))) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
            echo "        ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
            $context['loop'] = [
              'parent' => $context['_parent'],
              'index0' => 0,
              'index'  => 1,
              'first'  => true,
            ];
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                $length = count($context['_seq']);
                $context['loop']['revindex0'] = $length - 1;
                $context['loop']['revindex'] = $length;
                $context['loop']['length'] = $length;
                $context['loop']['last'] = 1 === $length;
            }
            foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
                // line 14
                echo "            ";
                $this->loadTemplate((("@nucleus/layout/" . $this->getAttribute($context["segment"], "type", [])) . ".html.twig"), "@nucleus/layout/section.html.twig", 14)->display(twig_array_merge($context, ["segments" => $this->getAttribute($context["segment"], "children", [])]));
                // line 15
                echo "        ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
                if (isset($context['loop']['length'])) {
                    --$context['loop']['revindex0'];
                    --$context['loop']['revindex'];
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 16
            echo "    ";
        }
        $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 19
        if (($this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "sticky", []) || twig_trim_filter(($context["html"] ?? null)))) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    }
 
    // line 30
    public function block_page_layout($context, array $blocks = [])
    {
        // line 31
        echo "    ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        $context['loop'] = [
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        ];
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            if (($this->getAttribute($context["segment"], "type", []) != "offcanvas")) {
                // line 32
                echo "        ";
                $this->loadTemplate((("@nucleus/layout/" . $this->getAttribute($context["segment"], "type", [])) . ".html.twig"), "@nucleus/page.html.twig", 32)->display(twig_array_merge($context, ["segments" => $this->getAttribute($context["segment"], "children", [])]));
                // line 33
                echo "    ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 34
        echo "    ";
    }
 
    // line 38
    public function block_page_top($context, array $blocks = [])
    {
        // line 39
        echo "    ";
    }
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['segment'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 18
        ob_start(function () { return ''; });
        // line 19
        echo "    ";
        $this->displayBlock('page_offcanvas', $context, $blocks);
        $context["page_offcanvas"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 26
        $context["page_offcanvas"] = ((twig_trim_filter(($context["page_offcanvas"] ?? null))) ? (twig_trim_filter(($context["page_offcanvas"] ?? null))) : (""));
        // line 27
        $context["offcanvas_position"] = ((($context["page_offcanvas"] ?? null)) ? ((($this->getAttribute($this->getAttribute(($context["offcanvas"] ?? null), "attributes", [], "any", false, true), "position", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute($this->getAttribute(($context["offcanvas"] ?? null), "attributes", [], "any", false, true), "position", []), "g-offcanvas-left")) : ("g-offcanvas-left"))) : (""));
        // line 29
        ob_start(function () { return ''; });
        // line 30
        echo "    ";
        $this->displayBlock('page_layout', $context, $blocks);
        $context["page_layout"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 37
        ob_start(function () { return ''; });
        // line 38
        echo "    ";
        $this->displayBlock('page_top', $context, $blocks);
        // line 40
        echo "    ";
        echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "top"], "method"), "
    ");
        echo "
";
        $context["page_top"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 43
        ob_start(function () { return ''; });
        // line 44
        echo "    ";
        $this->displayBlock('page_bottom', $context, $blocks);
        // line 46
        echo "    ";
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_head($context, array $blocks = [])
    {
        // line 4
        if (($context["page_head"] ?? null)) {
            // line 5
            echo "        ";
            echo ($context["page_head"] ?? null);
            echo "
    ";
        } else {
            // line 7
            echo "        ";
            $this->displayParentBlock("page_head", $context, $blocks);
            echo "
    ";
        }
    }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 2
        $context["twigTemplate"] = "page.html.twig";
        // line 3
        $context["scope"] = "page";
        // line 1
        $this->parent = $this->loadTemplate("partials/page.html.twig", "page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 5
    public function block_content($context, array $blocks = [])
    {
        // line 6
        echo "
    <div class=\"platform-content\">
        <div class=\"content-wrapper\">
            <section class=\"entry\">
 
                ";
        // line 11
        $this->loadTemplate([0 => (("partials/content-" . ($context["scope"] ?? null)) . ".html.twig"), 1 => "partials/content.html.twig"], "page.html.twig", 11)->display($context);
        // line 12
        echo "
            </section>
        </div> <!-- /content-wrapper -->
    </div>
 
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
 
        $key = null;
        $output = false;
        if ( false !== $expires ) {
            ksort($data);
            $key = md5($file.json_encode($data));
            $output = $this->get_cache($key, self::CACHEGROUP, $cache_mode);
        }
 
        if ( false === $output || null === $output ) {
            $twig = $this->get_twig();
            if ( strlen($file) ) {
                $loader = $this->get_loader();
                $result = $loader->getCacheKey($file);
                do_action('timber_loader_render_file', $result);
            }
            $data = apply_filters('timber_loader_render_data', $data);
            $data = apply_filters('timber/loader/render_data', $data, $file);
            $template = $twig->load($file);
            $output = $template->render($data);
        }
 
        if ( false !== $output && false !== $expires && null !== $key ) {
            $this->delete_cache();
            $this->set_cache($key, $output, self::CACHEGROUP, $expires, $cache_mode);
        }
        $output = apply_filters('timber_output', $output);
        return apply_filters('timber/output', $output, $data, $file);
    }
 
    protected function delete_cache() {
        Cleaner::delete_transients();
    }
 
    /**
     * Get first existing template.
     *
     * @param array|string $templates  Name(s) of the Twig template(s) to choose from.
     * @return string|bool             Name of chosen template, otherwise false.
     */
        if ( $via_render ) {
            $file = apply_filters('timber_render_file', $file);
        } else {
            $file = apply_filters('timber_compile_file', $file);
        }
 
        $output = false;
 
        if ($file !== false) {
            if ( is_null($data) ) {
                $data = array();
            }
 
            if ( $via_render ) {
                $data = apply_filters('timber_render_data', $data);
            } else {
                $data = apply_filters('timber_compile_data', $data);
            }
 
            $output = $loader->render($file, $data, $expires, $cache_mode);
        } else {
            if ( is_array($filenames) ) {
                $filenames = implode(", ", $filenames);
            }
            Helper::error_log( 'Error loading your template files: '.$filenames.'. Make sure one of these files exists.' );
        }
 
        do_action('timber_compile_done');
        return $output;
    }
 
    /**
     * Compile a string.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
        $twig = $dummy_loader->get_twig();
        $template = $twig->createTemplate($string);
        return $template->render($data);
    }
 
    /**
     * Fetch function.
     *
     * @api
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The returned output.
     */
    public static function fetch( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::compile($filenames, $data, $expires, $cache_mode, true);
        $output = apply_filters('timber_compile_result', $output);
        return $output;
    }
 
    /**
     * Render function.
     *
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     * Passes data to a Twig file and echoes the output.
     *
     * @api
     * @example
     * ```php
     * $context = Timber::context();
     *
     * Timber::render( 'index.twig', $context );
     * ```
     * @param array|string $filenames  Name of the Twig file to render. If this is an array of files, Timber will
     *                                 render the first file that exists.
     * @param array        $data       Optional. An array of data to use in Twig template.
     * @param bool|int     $expires    Optional. In seconds. Use false to disable cache altogether. When passed an
     *                                 array, the first value is used for non-logged in visitors, the second for users.
     *                                 Default false.
     * @param string       $cache_mode Optional. Any of the cache mode constants defined in TimberLoader.
     * @return bool|string The echoed output.
     */
    public static function render( $filenames, $data = array(), $expires = false, $cache_mode = Loader::CACHE_USE_DEFAULT ) {
        $output = self::fetch($filenames, $data, $expires, $cache_mode);
        echo $output;
        return $output;
    }
 
    /**
     * Render a string with Twig variables.
     *
     * @api
     * @example
     * ```php
     * $data = array(
     *     'username' => 'Jane Doe',
     * );
     *
     * Timber::render_string( 'Hi {{ username }}, I’m a string with a custom Twig variable', $data );
     * ```
     * @param string $string A string with Twig variables.
     * @param array  $data   An array of data to use in Twig template.
     * @return bool|string
     */
 *
 * To generate specific templates for your pages you can use:
 * /mytheme/views/page-mypage.html.twig
 * (which will still route through this PHP file)
 * OR
 * /mytheme/page-mypage.php
 * (in which case you'll want to duplicate this file and save to the above path)
 */
 
$gantry = Gantry\Framework\Gantry::instance();
$theme  = $gantry['theme'];
 
// We need to render contents of <head> before plugin content gets added.
$context              = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);
 
$post            = Timber::query_post();
$context['post'] = $post;
 
Timber::render(['page-' . $post->post_name . '.html.twig', 'page.html.twig'], $context);
 
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache/2
REQUEST_URI /test/
LC_ALL pl_PL
LANG pl_PL
USER server926745
HOME /home/server926745/ftp
SCRIPT_URI http://rzeszow.ap.gov.pl/test/
REMOTE_ADDR 3.239.214.173
SERVER_ADDR 85.128.177.156
PATH_TRANSLATED /home/server926745/ftp/aprzeszow/index.php
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /test/
REMOTE_PORT 40644
SCRIPT_FILENAME /home/server926745/ftp/aprzeszow/index.php
SERVER_ADMIN webmaster@server926745.nazwa.pl
CONTEXT_DOCUMENT_ROOT /home/server926745/ftp/aprzeszow
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /home/server926745/ftp/aprzeszow
SERVER_PORT 80
SERVER_NAME rzeszow.ap.gov.pl
SERVER_SIGNATURE
PATH /bin:/usr/bin:/usr/local/bin:/home/conf/alternatives
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_HOST rzeszow.ap.gov.pl
REDIRECT_STATUS 200
REDIRECT_HTTP_AUTHORIZATION
HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI http://rzeszow.ap.gov.pl/test/
REDIRECT_SCRIPT_URL /test/
SCRIPT_URL /test/
REDIRECT_UNIQUE_ID Zfj2zIHkAw7e7cPaQsLmrgAAAAk
UNIQUE_ID Zfj2zIHkAw7e7cPaQsLmrgAAAAk
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710814924,3859
REQUEST_TIME 1710814924
Key Value
LC_ALL pl_PL
LANG pl_PL
USER server926745
HOME /home/server926745/ftp
SCRIPT_URI http://rzeszow.ap.gov.pl/test/
REMOTE_ADDR 3.239.214.173
SERVER_ADDR 85.128.177.156
PATH_TRANSLATED /home/server926745/ftp/aprzeszow/index.php
SCRIPT_NAME /index.php
REQUEST_URI /test/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /test/
REMOTE_PORT 40644
SCRIPT_FILENAME /home/server926745/ftp/aprzeszow/index.php
SERVER_ADMIN webmaster@server926745.nazwa.pl
CONTEXT_DOCUMENT_ROOT /home/server926745/ftp/aprzeszow
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /home/server926745/ftp/aprzeszow
SERVER_PORT 80
SERVER_NAME rzeszow.ap.gov.pl
SERVER_SOFTWARE Apache/2
SERVER_SIGNATURE
PATH /bin:/usr/bin:/usr/local/bin:/home/conf/alternatives
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_HOST rzeszow.ap.gov.pl
REDIRECT_STATUS 200
REDIRECT_HTTP_AUTHORIZATION
HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI http://rzeszow.ap.gov.pl/test/
REDIRECT_SCRIPT_URL /test/
SCRIPT_URL /test/
REDIRECT_UNIQUE_ID Zfj2zIHkAw7e7cPaQsLmrgAAAAk
UNIQUE_ID Zfj2zIHkAw7e7cPaQsLmrgAAAAk
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710814924,3859
REQUEST_TIME 1710814924
0. Whoops\Handler\PrettyPageHandler