Blog pager size

Topics: Troubleshooting
Feb 22, 2013 at 6:35 PM
Is there a way to change the page size for Blogs without changing the global page size in the General Site Settings? We have a highly stylized blog and we would only like 2 posts to show up per page, but changing the global pager number to 2 sets our default page size in the Admin panel to 2 as well. That can get pretty annoying when trying to manage content.

Is there another way to set the page number for a blog?

Thanks
Coordinator
Feb 23, 2013 at 12:46 AM
You might want to switch to a projection, that will give you all kinds of additional flexibility besides the page size.
Sep 24, 2013 at 12:27 AM
Hello Bertrand:

So is it better to leave the blogs just as a way to manage the content and show all the post in projections??

No way to easily add/customize pager for blogs?
Coordinator
Sep 24, 2013 at 12:37 AM
That's what I do myself.
Sep 24, 2013 at 12:59 AM
Understood, that's ok for the list of all blog posts.

What should I do if I need a pager inside every blog post to go to the next and previous post?

Thanks!
Coordinator
Sep 24, 2013 at 1:05 AM
Override the content shape and add it. The difficult part is that you'll have to make a query for the previous and next posts from somewhere.
Sep 25, 2013 at 4:09 PM
BertrandLeRoy wrote:
Override the content shape and add it. The difficult part is that you'll have to make a query for the previous and next posts from somewhere.
Thanks bertrand.

I'm not completely sure of what you are suggesting me but my guess tells me that I have to start modifying the code (Inside Orchard using VS), is this right?

Reading the content shape documentation would be a good start then.
Coordinator
Sep 25, 2013 at 9:45 PM
Sep 27, 2013 at 4:18 PM
Hello Bertrand:

I've been watching this videos and they have been really helpful: http://www.youtube.com/channel/UCkvZPDnFbZXxW6wIsWjT5bQ/videos

Ron shows clearly how easy it is to query something from the data base in the code but he is making a module. Since my needs are based on overwriting the shape, where can I make the query?

From MVC rules it would be extremely wrong to make the query right in the shape (.cshtml); so what do you suggest me to make the query?

Thanks!
Coordinator
Sep 27, 2013 at 9:50 PM
You will have to write a module.