-
I'm looking to generate paginated content for my blog section. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Ok my bad i think i have found out how to do, for some reason dotnet watch wasent picking my changes, and i tought that route parameter werent working, i see you use it on the Page.cshtml example. Basically i think i should use |
Beta Was this translation helpful? Give feedback.
-
One limitation of Razor Pages is that it can only support a single route, so to handle pagination in https://diffusion.works (Blazor Diffusion rewritten in Razor SSG/Vue) is to have different Razor Pages for the first and another for the paginated page: E.g https://diffusion.works/latest is handled by /Pages/Latest.cshtml @page "/latest" and other paginated pages like https://diffusion.works/latest_2 is handled in /Pages/LatestPage.cshtml @page "/latest_{Page}" /Pages/Album.cshtml and /Pages/AlbumPage.cshtml does the same for https://diffusion.works/albums/league-of-legends and https://diffusion.works/albums/league-of-legends_2 |
Beta Was this translation helpful? Give feedback.
Ok my bad i think i have found out how to do, for some reason dotnet watch wasent picking my changes, and i tought that route parameter werent working, i see you use it on the Page.cshtml example.
Basically i think i should use
@page "/pages/{index:int?}"
and generate the links to move between pages right?