Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update archive.njk #1

Merged
merged 1 commit into from
Sep 20, 2022
Merged

Update archive.njk #1

merged 1 commit into from
Sep 20, 2022

Conversation

angelside
Copy link
Contributor

@angelside angelside commented Sep 20, 2022

Pagination check did not work for me, I am thinking "if not" can be work with booleans, nunjucks docs does not help much.

I have 4 posts, pagination size is 2.

totalPages: 2
totalResults: 4

With current expression, pagination is not showing at all.


I change below:

{% if not pagination.totalPages == 1 %}

to this:

{% if pagination.totalPages != 1 %}

I am with latest version
https://deno.land/x/lume@v1.11.4/

Did not work for me, I am thinking "if not" can be work only for booleans, nunjucks docs does not help much.

I change below:

```njk
{% if not pagination.totalPages == 1 %}
```

to this:

```njk
{% if pagination.totalPages != 1 %}
```
I am with latest version
https://deno.land/x/lume@v1.11.4/
@oscarotero
Copy link
Member

Mmm, that's weird. But your solution si more elegant. Thanks!

@oscarotero oscarotero merged commit 99982ac into lumeland:main Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants