# Section vs Page

**URL:** https://zola.discourse.group/t/section-vs-page/522
**Category:** Uncategorized
**Created:** [July 29, 2020, 4:26pm UTC](https://zola.discourse.group/t/section-vs-page/522 "2020-07-29T16:26:00Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hugotrentesaux/32/105_2.png) [@HugoTrentesaux](https://zola.discourse.group/u/HugoTrentesaux)
#### Post date: [July 29, 2020, 10:13pm UTC](https://zola.discourse.group/t/section-vs-page/522/3 "2020-07-29T22:13:11Z")

</div>

> [@keats](#):
>
> easier to have the two concepts separated for documentation

You’re right and I think that’s the whole point. There is no reason separating both in terms of functionality but when it comes to explaining how to _use_ zola, it’s very useful to introduce two concepts.

Here is a detail of the front-matter of page only, section only, and both:

```auto
# page
date =
updated =
draft = false
slug = ""
path = ""
[taxonomies]

```

```auto
# section
sort_by = "none"
page_template =
paginate_by = 0
paginate_path = "page"
insert_anchor_links = "none"
render = true
redirect_to = 
transparent = false

```

```auto
# both
title = ""
description = ""
weight = 0
in_search_index = true
template = "some.html"
aliases = []
[extra]

```

Here is a detail of the variables available in a template for page only, section only, and both:

```auto
# page
date: String?;
year: Number?;
month: Number?;
day: Number?;
updated: String?;
slug: String;
draft: Bool;
summary: String?;
taxonomies: HashMap<String, Array<String>>;
earlier: Page?;
later: Page?;
heavier: Page?;
lighter: Page?;

```

```auto
# section
pages: Array<Page>;
subsections: Array<String>;

```

```auto
# both
content: String;
title: String?;
description: String?;
path: String;
components: Array<String>;
permalink: String;
toc: Array<Header>,
word_count: Number;
extra: HashMap<String, Any>;
translations: Array<TranslatedContent>;
lang: String;
relative_path: String;
ancestors: Array<String>;
assets: Array<String>;
reading_time: Number;

```

Right now I need my section to have taxonomies and the clean way to do that is to make it a page and to have a section to organize content. In the template, I have to load the section to get the content organization stuff. So I have a template mixing page and section. I think a cleaner way to do that is to have page and section the same object (lets call it “resource”) with the only difference that `_index.md` is a resource whose default template is section.html and `index.md` or something else is a resource whose default template is `page.html`. In both templates, the resource will be available with the `resource` keyword so that template elements (like macros) can be reused for pages and sections.

You can look for example at the [http://duniter.trentesaux.fr/wiki/](http://duniter.trentesaux.fr/wiki/) section (I ported the site from pelican). It has a breadcrumb feature allowing to browse between subsections and subpages as follows:

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

But I want it to benefit from the date and taxonomies today reserved to a page (here is a page example):

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

And I will have to compensate this lack of feature of a section by mixing page and section in my template. That’s an example which might be interesting later when thinking about the design 🙂

---

_[View the full topic](https://zola.discourse.group/t/section-vs-page/522)._
