# Page - asset - confusion

**URL:** <https://zola.discourse.group/t/page-asset-confusion/235>\
**Category:** Support\
**Created:** [November 5, 2019, 12:11pm UTC](https://zola.discourse.group/t/page-asset-confusion/235 "2019-11-05T12:11:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fzett](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@fzett](https://zola.discourse.group/u/fzett)\
**Post date:** [November 5, 2019, 12:11pm UTC](https://zola.discourse.group/t/page-asset-confusion/235/1 "2019-11-05T12:11:35Z")

</div>

hi there.  
i’m new to zola and a bit confused after some experimenting.  
[zola 0.9.0]

* * *

## the problem:

i want to publish the slides of my course for my studets.  
simple task: on every site you have some words/ media and a _next_-link

now i thought i create a section with a page per slide:

```auto
|---talk_1/
| |---slide1.md
| |---slide2.md
| |--- ... 
|
|---static/talk_1/
| |---doorbell.jpg
| |---xenakis.mp3

```

when building i get a problem with the (relative links) assets for each slide

```auto
---talk_1/
   |---slide1/
       |---index.html
   |---slide2/
       |---index.html
   |--- ... 
   |---doorbell.jpg
   |---xenakis.mp3

```

because the html suggest that the files would be within the slideX folder.  
` /talk_1/slide24/xenakis.mp3`

i wrote a short code for the media embeds. for example:

/template/audio.html:

```auto
<img alt="{{alt}}" src='{{src}}'>

```

in the slide.md file i say:

```auto
{{ image(src="./doorbell.jpg" alt="doorbell") }}

```

the _ **next** _ link also doesn’t work with this setup.  
in each .md page i define a

```auto
[extra]
n = <next slide>

```

in the template the link is created:

```auto
{% if page.extra.n %}
<div class="next">
  <a href="./slide{{ page.extra.n }}"></a>
</div>
{% endif %}

```

here i have the same problem that the rendered link looks like:

```auto
<a href="/slide1/slide2/index.html">next</a>

```

this works fine with `zola serve` but the build doesn’t work..  
is this a bug or a feature?

* * *

## assumption: wrong approach?

although i would expect zola to ‘correct’ the links i’ve been looking into the [pagination](https://www.getzola.org/documentation/templates/pagination/) thing because it seemed to be actually what i want but the documentation is not explicit enough for me.

> Two things can get paginated: a section and a taxonomy term.

how do i paginate a section?  
the documentation only tells me what happens if a section already _is_ paginated:

> A paginated section gets the same `section` variable as a normal [section page](https://www.getzola.org/documentation/templates/pages-sections/#section-variables) minus its pages. The pages are instead in `paginator.pages`

(the classic problem of teaching/knowledge transfer: it’s hard to forget what one already knows.)

---

<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:** [November 5, 2019, 4:48pm UTC](https://zola.discourse.group/t/page-asset-confusion/235/2 "2019-11-05T16:48:51Z")

</div>

To enable pagination, you have to follow: [https://www.getzola.org/documentation/content/section/#pagination](https://www.getzola.org/documentation/content/section/#pagination)  
Once it’s setup, each page will automatically have `earlier/later` (if they are sorted by date) or `lighter/heavier` (if they are sorted by weight) which can be used like so [https://github.com/getzola/zola/blob/master/test\_site/templates/page.html#L8-L9](https://github.com/getzola/zola/blob/master/test_site/templates/page.html#L8-L9)

Considering that’s the second post asking for that just today, it should probably have its own section in the docs to stand out.

---

<div class="post-metadata">

**Author:** ![fzett](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@fzett](https://zola.discourse.group/u/fzett)\
**Post date:** [November 8, 2019, 10:35pm UTC](https://zola.discourse.group/t/page-asset-confusion/235/3 "2019-11-08T22:35:27Z")

</div>

thanks for your reply!  
just to be explicit:  
in the section file ‘\_index.md’ in the /talk\_1/ folder

```auto
|---talk_1/
| |---_index.md
| |---slide1.md
| |---slide2.md
| |--- ... 

```

i would write

```auto
+++
paginate_by = 1
paginate_path = slide
+++

```

and the section `talk_1` would be paginated?

still the question remains:  
wouldn’t this rather be a ‘hack’ considering the implicit idea of the common use of a paginator?  
would there be a better approach to my problem?  
thanks!
