Front Matter Global Variable on all pages in BigCommerce theme
<p>I'm trying to create a dropdown menu when the user hovers over in my navigation displays account information such as previous orders.</p>
<p>I'm using Stencil/Cornerstone. I've tried declaring a Front Matter Object on <code>page.html</code> using</p>
<pre><code>---
customer: 
    orders: 
        limit 5
--- 
</code></pre>
<p>but that doesn't seem to work, the only place the menu is pulling the customers orders through is if the user is on an account page. I need this to be available on all pages as it's the sites main navigation.</p>
<h1>menu-bar.html</h1>
<p>(snippet)</p>
<pre><code>{{#if customer}}
    &lt;li class=&quot;nav-page&quot;&gt;&lt;a href=&quot;/account.php&quot;&gt;My Account&lt;/a&gt;
        &lt;div class=&quot;sub-menu&quot;&gt;
            &lt;div class=&quot;nav-col&quot;&gt;
                &lt;h4&gt;Hello, {{customer.name}}&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class=&quot;nav-col&quot;&gt;
                &lt;!-- orders --&gt;
                &lt;h5&gt;Orders&lt;/h5&gt;
                &lt;ul class=&quot;account-order-list&quot;&gt;
                    {{#if customer.orders}} {{#each customer.orders}}
                    &lt;li&gt;&lt;a href=&quot;{{details_url}}&quot;&gt;&lt;i class=&quot;fa fa-tag&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt; Order #{{id}}&lt;/a&gt;
                        &lt;div class=&quot;order-details-list&quot;&gt;
                            &lt;a class=&quot;details&quot; href=&quot;{{details_url}}&quot;&gt;
                                &lt;span&gt;&lt;strong&gt;Date:&lt;/strong&gt; {{date}} &lt;/span&gt;
                                &lt;span&gt;&lt;strong&gt;Amount:&lt;/strong&gt; {{total.formatted}} &lt;/span&gt;
                                &lt;span&gt;&lt;strong&gt;Status:&lt;/strong&gt; {{status}}&lt;/a&gt;&lt;/span&gt;

                        &lt;/div&gt;
                    &lt;/li&gt;
                    {{/each}} {{else}}
                    &lt;span&gt;You have no orders.&lt;/span&gt; {{/if}}
                &lt;/ul&gt;
            &lt;/div&gt;
            &lt;div class=&quot;nav-col&quot;&gt;
                &lt;h5&gt;&lt;/h5&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/li&gt;
    {{else}}
    &lt;li class=&quot;nav-page&quot;&gt;&lt;a href=&quot;/login.php&quot;&gt;Sign In&lt;/a&gt;&lt;/li&gt;
    {{/if}}
&lt;/ul&gt;
</code></pre>