Unfortunately its a private repo. I think I need to take a step back and figure the language issue later. For now lets just consider plain pagination.
I think what might be causing the issue is that I do not clearly understand how the context
changes when I use {{pagination}}
.
I tried two things:
{{pagination}}
Inside the pagination.hbs
file, I used {{log this}}
and then I get output as below (condensed version):
{
version: '5.70.2',
context: [ 'blog-en', 'page' ],
...
pagination: { page: 1, limit: 10, pages: 10, total: 100, next: 2, prev: null },
page: 1,
...
isSecondary: false,
limit: 10,
pages: 10,
total: 100,
next: 2,
prev: null
}
Pagination helpers like {{page_url prev}}
and {{page_url next}}
work inside pagination.hbs
.
{{> "pagination"}}
On using {{log this}}
in this case I see:
{
version: '5.70.2',
context: [ 'blog-en', 'page' ],
...
pagination: { page: 1, limit: 10, pages: 10, total: 100, next: 2, prev: null },
page: {
slug: 'blog-en',
id: 'xxx',
uuid: 'yyy,
title: 'Blog',
...
tags: [ [Object], [Object], [Object], [Object], [Object] ],
...
isSecondary: false
}
Pagination helpers like {{page_url prev}}
and {{page_url next}}
do not work inside pagination.hbs
.
I had thought that the above two approaches were not different since I am still using the same template hbs file. Can you please help me understand how the context changes? I read through the Ghost Docs about partials and pagination but your help would be great!