# Z12.2: can't access an \`\[extra\]\` property on section?

**URL:** https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629
**Category:** Support
**Created:** [October 5, 2020, 12:28pm UTC](https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629 "2020-10-05T12:28:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Hyperseeker](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hyperseeker/32/851_2.png) [@Hyperseeker](https://zola.discourse.group/u/Hyperseeker)
#### Post date: [October 5, 2020, 12:28pm UTC](https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629/1 "2020-10-05T12:28:06Z")

</div>

I have the following snippet generating a list of active projects:

```auto
{% for category_subsection in category.subsections %}
        
  {% set project = get_section(path=category_subsection) %}
        
  {% if not project.extra.active %} {% continue %} {% endif %}
                
  <li>
    <a href="{{ project.path }}">{{ project.extra.logline }}</a>
  </li>
            
{% endfor %}

```

As you can see, it takes a subsection, discards it if it isn’t active, and prints a list item with project information. _Or so I thought_. It doesn’t discard the project _if it’s inactive_: it discards the project if it doesn’t have `project.extra.active` property, which is not the kind of filtering I need.

So I went on to rectify it today:

```auto
  {% if project.extra.active == false %} {% continue %} {% endif %}

```

Which landed me with an interesting error:

```auto
Failed to build the site
Error: Failed to render section '<directory>\content\_index.md'
Reason: Failed to render 'index.html'
Reason: Variable `project.extra.active` not found in context while rendering 'includes/frontpage/current_projects.html'  

```

The reason it’s interesting is because I’ve manually written an `active = true/false` property under the `[extra]` TOML heading in every single project I have on the site.

The other reason it’s interesting is because, with the previous “wrong” version of the template, I end up with a list of projects rendered exactly as I wanted it except for status filtering. That’s not what’s supposed to happen, is it? It’s supposed to skip all projects that _don’t_ have `.extra.active` defined, meaning Zola has to be able to access it in some capacity. I’d think so, given that `{% if project.extra.active %} {% endif %}` (no negation) causes the exact same issue as not having the conditional at all…

…which is that Zola can’t seem to access the `project.extra.<name>` property (again, perfectly in-place and written and a string). The `project.extra` section can be rendered in the template and returns exactly what you’d expect: the `[extra]` section of the project’s TOML definition, exactly as I’d written it, for every project.

**TL;DR** : Even though the properties are present and can be rendered in JSON on the page, Zola throws trying to access them.

---

<div class="post-metadata">

### Author: ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)
#### Post date: [October 6, 2020, 6:53am UTC](https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629/2 "2020-10-06T06:53:25Z")

</div>

That’s odd, I just tried the following snippet on my site and it worked fine?

```auto
    {% set project = get_section(path="blog/_index.md") %}
    {{ project.extra.active }}

```

after having set

```auto
[extra]
active = true

```

in my blog section front-matter.  
Can you make a small reproduction I can run?

---

<div class="post-metadata">

### Author: ![Hyperseeker](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hyperseeker/32/851_2.png) [@Hyperseeker](https://zola.discourse.group/u/Hyperseeker)
#### Post date: [October 11, 2020, 4:59pm UTC](https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629/3 "2020-10-11T16:59:33Z")

</div>

I’ve been trying to figure out how to accomplish that, and I admit: I’m confused as to how to pull that off.

Would a full copy of the raw site suffice, instead? There’s no private content, and the site’s gonna be published soon anyway.

I ask because I’ve stumbled upon the second time Zola fails to read a section property, and this time it’s more important 'cause I’m not failing to display content I should display.

---

<div class="post-metadata">

### Author: ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)
#### Post date: [October 12, 2020, 10:36am UTC](https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629/4 "2020-10-12T10:36:09Z")

</div>

Yep that would be fine, you can send in PM as well if you don’t want to post it publicly yet

---

<div class="post-metadata">

### Author: ![Hyperseeker](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hyperseeker/32/851_2.png) [@Hyperseeker](https://zola.discourse.group/u/Hyperseeker)
#### Post date: [October 17, 2020, 1:20pm UTC](https://zola.discourse.group/t/z12-2-cant-access-an-extra-property-on-section/629/5 "2020-10-17T13:20:02Z")

</div>

This can now be closed: @keats helped me identify the issues with templating on my end, and the build process now works without a hitch.
