# Z12.2: \`draft\` property ignored on sections?

**URL:** <https://zola.discourse.group/t/z12-2-draft-property-ignored-on-sections/626>\
**Category:** Support\
**Created:** [October 4, 2020, 7:13pm UTC](https://zola.discourse.group/t/z12-2-draft-property-ignored-on-sections/626 "2020-10-04T19:13:50Z")\
**Posts on this page:** 4\
**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 4, 2020, 7:13pm UTC](https://zola.discourse.group/t/z12-2-draft-property-ignored-on-sections/626/1 "2020-10-04T19:13:51Z")

</div>

Until it’s possible for me to [use sections directly](https://zola.discourse.group/t/enable-looping-over-sections-or-page-section-colocation/612), I’m relying on a section-based structure to emulate page-like behavior for project pages. This mostly comes down to using `[extra]`-type TOML properties to add context to each project.

For example:

```auto
title = "Rosa"
description = "..."
draft = true

template = "projects/project.html"
page_template = "projects/chapter.html"
	
[extra]
active = false
status = ["pre-production", "long-term"]

logline = "..."

```

I used to use an `[extra]` property `hidden` to explain to the templating engine that this project is not to be rendered. After that – while projects were still page-based – I realized I could use the regular property `draft` to the same effect, without having to specify additional code to loop over hidden projects.

It appears as though this property is ignored, in one capacity or another, on some (but not all) sections. Even though I’m staring at it in the project’s TOML definition, there’s neither a `draft` property nor a value to it, `true` or `false`, in the resulting loop-based listing:

```auto
{

	"relative_path": "writing/rosa/_index.md", 
	"content": "<p>...</p>\n", 
	"permalink": "http://127.0.0.1:1111/writing/rosa/", 
	"ancestors": [ 
		"_index.md", 
		"writing/_index.md" 
	], 
	"title": "Rosa", 
	"description": "...", 
	"extra": { 
		"active": false, 
		"status": [ 
			"pre-production", 
			"long-term" 
		], 
		"logline": "..." 
	}, 
	"path": "/writing/rosa/", 
	"components": [ 
		"writing", 
		"rosa" 
	], 
	"toc": [], 
	"word_count": 0, 
	"reading_time": 0, 
	"lang": "en", 
	"assets": [], 
	"pages": [], 
	"subsections": [], 
	"translations": []
	
}

```

That’s it. There’s not even a mention of a `draft` property in the output, even though it’s present in the TOML definition of the project above.

More bizarre is the fact that the property itself only renders on 2 of the 4 projects in the category:

 ![](https://global.discourse-cdn.com/free1/uploads/zola1/original/1X/2cb8c5745207639fe5b95cba8e4409ae261307ec.png)

The searched text is highlit only in two JSONized project definitions, even though all four of them have it in the same way. (I’ve checked, twice.) You can see from the search modal in the top right that there are, in fact, two `draft` definitions present (in the first two projects), but not on the ones below.

My goal is, just like with page-based projects, to filter out sections automatically if they’re described as `draft = true`. This works for pages, and I don’t see why it shouldn’t work for sections. Work-in-progress categories of content are nothing new.

It would be more acceptable if no section would ever render or use `draft`; that would be somewhat fair. This kind of selective behavior, I’m not sure how to approach. Could it be on my end? If so, what can I provide to make the case clearer?

---

<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 5, 2020, 8:35am UTC](https://zola.discourse.group/t/z12-2-draft-property-ignored-on-sections/626/2 "2020-10-05T08:35:52Z")

</div>

This is not implemented yet: [https://github.com/getzola/zola/issues/927](https://github.com/getzola/zola/issues/927)  
I would take a PR for it though.

---

<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, 9:57am UTC](https://zola.discourse.group/t/z12-2-draft-property-ignored-on-sections/626/3 "2020-10-05T09:57:02Z")

</div>

Wait, so: is it intended that some sections _do_ in fact contain the `draft` property?

Regarding PR: I’ll see what I can do. Rust seems like a good language to get into.

---

<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 5, 2020, 10:10am UTC](https://zola.discourse.group/t/z12-2-draft-property-ignored-on-sections/626/4 "2020-10-05T10:10:43Z")

</div>

I’m not sure where the `draft` is coming from on sections in your example, the code only ever looks at pages for `draft`.

> [@Hyperseeker](#):
>
> Regarding PR: I’ll see what I can do. Rust seems like a good language to get into.

Feel free to ask for help/advices!
