# Recursively set metadata in sections

**URL:** <https://zola.discourse.group/t/recursively-set-metadata-in-sections/47>\
**Category:** Feature requests\
**Created:** [January 13, 2019, 4:34pm UTC](https://zola.discourse.group/t/recursively-set-metadata-in-sections/47 "2019-01-13T16:34:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://zola.discourse.group/u/abc)\
**Post date:** [January 13, 2019, 4:34pm UTC](https://zola.discourse.group/t/recursively-set-metadata-in-sections/47/1 "2019-01-13T16:34:27Z")

</div>

it would be nice to have a front-matter variable for sections that sets metadata for all pages recursively

* * *

**use case 1** : consider a `drafts/` folder. `drafts/_index.md` might look like:

```auto
+++
[all]
draft = true
+++

```

* * *

**use case 2** : consider a `blog/` folder, with a `rust/` folder inside. `blog/rust/_index.md` might look like:

```auto
+++
[all.taxonomies]
tags = ["rust"]
+++

```

there is a drawback: if you want to tag a post `rust` _and_ `web`, you’d have to write `rust` again.

* * *

**use case 3** : consider a website using `extra` to define each page’s navigation. `extra.nav` is an array of tables, each table defining `name` and `url`. `blog/_index.md` could look like:

```auto
+++
[[all.extra.nav]]
name = "back"
url = "/blog/"
+++

```

* * *

currently, some section variables apply to all pages, but most don’t. `all` would help making a distinction:

- `page_template` could be obsoleted in favour of `all.template`
- `in_search_index` could be obsoleted in favour of `all.in_search_index`, and later reintroduced to apply to the section page itself, but not its child pages

---

<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:** [January 15, 2019, 5:43pm UTC](https://zola.discourse.group/t/recursively-set-metadata-in-sections/47/2 "2019-01-15T17:43:26Z")

</div>

Interesting idea. Not planning that for the next release but i’ll think about it for the one after.
