Check for local scope of a fieldset variable

Hi, I think I'm asking a similar question to this one, but the answer hasn't helped us:
We're just starting to develop with Stamatic and are loving it, but still learning the ropes. In the following scenario we are finding the parent value for a variable is being used if the local scope value isn't set, but we don't want to use the parent value and are trying to detect the fact that the local scope variable is not set. Here is the scenario:


Which results in two pages:

Both pages use the same template and fieldset (this seems to be an important part of the issue). Within the fieldset, there is a field called "header" and it is a standard text field. Within the /clients page the value for header is set, but within the /clients/training page, the value is empty and the empty field is not saved to the front matter when using the admin control panel.

In our template code we have:

{{ if header }}
    <h1>{{ header }}</h1>
    <span class="line-breaker"></span>
{{ endif }}

Essentially we only want the header and it's surrounding markup to be displayed if the user has typed in a value for header in the admin panel for that page, if they leave it blank we don't want any of the markup to show. However, in this scenario the value of header from the parent page (/clients) is being output as the value in the child page (/clients/training) but we don't want that to happen. How can we test the existence of header only from the current page scope of /clients/training? Thanks very much for your help!

>>>>>>> Unanswered <<<<<<<
4 Replies