Orchardcore: Pager Shape in Liquid

Created on 20 Jan 2020  路  6Comments  路  Source: OrchardCMS/OrchardCore

Perhaps I am missing something obvious, but it seems the "Pager" shape should be able to be rendered via Liquid (i.e. generating a new shape - I know it can be altered from the List). Here are my code snippets:

<h2>Pager Slim</h2>
{{ "PagerSlim" | shape_new: before: "12345", after: "78910", pageSize: 10 | shape_render }}

<h2>Pager</h2>
{{ "Pager" | shape_new: page: 5, pageSize: 10, defaultPageSize: 100 | shape_render }}

Pager Slim renders fine, but Pager doesn't render anything. I have looked through the code, and tried to even debug, but am not sure why "Pager" doesn't output anything...

documentation

Most helpful comment

@Skrypt I owe you one! That solves my problem 2 ways:

  1. I can now use the Pager shape
  2. I had forgotten it resolves to "Pager_Links" which is why I was missing the required parameter

Thanks so much!

For my future self, this is what worked:

<h2>Pager (unstyled)</h2>
{{ "Pager" | shape_new: page: 5, pageSize: 10, defaultPageSize: 100, totalItemCount: 100 | shape_render }}

All 6 comments

Maybe you are missing TotalItemCount?

Tried adding it in:

<h2>Pager (unstyled)</h2>
{{ "Pager" | shape_new: page: 5, pageSize: 10, defaultPageSize: 100, totalCount: 100 | shape_render }}

Still didn't work. Too bad. It seems it should work, just can't find all the parameters / where it is failing in the code.

@Skrypt I owe you one! That solves my problem 2 ways:

  1. I can now use the Pager shape
  2. I had forgotten it resolves to "Pager_Links" which is why I was missing the required parameter

Thanks so much!

For my future self, this is what worked:

<h2>Pager (unstyled)</h2>
{{ "Pager" | shape_new: page: 5, pageSize: 10, defaultPageSize: 100, totalItemCount: 100 | shape_render }}

We need documentation

Was this page helpful?
0 / 5 - 0 ratings

Related issues

superluminalK picture superluminalK  路  4Comments

aghili371 picture aghili371  路  3Comments

sebastienros picture sebastienros  路  4Comments

chillibug picture chillibug  路  4Comments

deanmarcussen picture deanmarcussen  路  3Comments