# Should transparant sections pass their subsections?

**URL:** <https://zola.discourse.group/t/should-transparant-sections-pass-their-subsections/1965>\
**Category:** Feature requests\
**Created:** [December 12, 2023, 8:18am UTC](https://zola.discourse.group/t/should-transparant-sections-pass-their-subsections/1965 "2023-12-12T08:18:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bemyak](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/bemyak/32/1106_2.png) [@bemyak](https://zola.discourse.group/u/bemyak)\
**Post date:** [December 12, 2023, 8:18am UTC](https://zola.discourse.group/t/should-transparant-sections-pass-their-subsections/1965/1 "2023-12-12T08:18:31Z")

</div>

Hi!

I’m working on adding sorting and `lower`/`higher` fields to sections (@keats noted [here](https://zola.discourse.group/t/next-previous-section-based-on-weight/528/2) that them being missing is a bug), and I stumbled upon one small inconsistency while writing tests.

Now sections can be “transparent”, which means that they reparent their **pages** to the ancestor section. But this doesn’t apply to **subsections**. So if we have something like:

```auto
content/_index.md
├─content/blog/_index.md weight=0
├─content/novels/_index.md weight=3
└─content/wiki/_index.md weight=0 transparent=true
  ├─content/wiki/recipes/_index.md weight=1
  └─content/wiki/dev/_index.md weight=2

```

… the structure will be preserved, and `transparent=true` will kinda be ignored.

I would expect Zola to flatten the subsection list, so we would get:

```auto
content/_index.md
├─content/blog/_index.md weight=0
├─content/wiki/recipes/_index.md weight=1
├─content/wiki/dev/_index.md weight=2
└─content/novels/_index.md weight=3

```

Is this a bug, or is it supposed to work like this? Should I fix it?

---

<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:** [December 12, 2023, 8:45am UTC](https://zola.discourse.group/t/should-transparant-sections-pass-their-subsections/1965/2 "2023-12-12T08:45:25Z")

</div>

Hmm that’s a good question. I’m not entirely sure what should be the outcome since I didn’t think of `transparent` as something over sections. If we make that feature, I think it should be opt-in in some ways?

---

<div class="post-metadata">

**Author:** ![bemyak](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/bemyak/32/1106_2.png) [@bemyak](https://zola.discourse.group/u/bemyak)\
**Post date:** [December 12, 2023, 9:51am UTC](https://zola.discourse.group/t/should-transparant-sections-pass-their-subsections/1965/3 "2023-12-12T09:51:21Z")

</div>

A real-life use case would be this one:  
Imagine a user who prefers storing their posts organized by date. (e.g. `content/2023/01/...`).  
In addition, they write an ongoing series of posts named `learn_rust`

```auto
content/
└─2023/ transparent=true
  └─01/ transparent=true
    ├─post1.md
    └─learn_rust/
      ├─day1.md
      └─day2.md

```

I would expect the end result to look like:

```plaintext
content/
├─post1.md
└─learn_rust/
  ├─day1.md
  └─day2.md

```

While currently only the posts “bubble up”:

```plaintext
content/
├─post1.md
└─2023/
  └─01/
    ├─post1.md
    └─learn_rust/
      ├─day1.md
      └─day2.md

```

To me, it seems more like a bug, tbh.  
Here’s a [toy project](https://gitlab.com/bemyak/zola-test-transparency) to test this.
