You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have seen that if we go beyond the page per blog. Older navigation option does not appear. The reason what I found is to do with this code
int pageCount; pageCount = int.TryParse(ViewData[Constants.TotalPostCount].ToString(), out pageCount) ? 0 : pageCount / 2;
Here we can see if TryParse is true, pageCount is always getting set to 0. Not sure what is that way and even what is the logic behind putting the hard coded value of 2 in pageCount/2.
This is the code what I think should work int pageCount; pageCount = int.TryParse(ViewData[Foodzy.Utility.Blog.Constants.TotalPostCount].ToString(), out pageCount) ? (pageCount - 1) / settings.Value.PostsPerPage : 0;
The text was updated successfully, but these errors were encountered:
I have seen that if we go beyond the page per blog. Older navigation option does not appear. The reason what I found is to do with this code
int pageCount; pageCount = int.TryParse(ViewData[Constants.TotalPostCount].ToString(), out pageCount) ? 0 : pageCount / 2;
Here we can see if TryParse is true, pageCount is always getting set to 0. Not sure what is that way and even what is the logic behind putting the hard coded value of 2 in pageCount/2.
This is the code what I think should work
int pageCount; pageCount = int.TryParse(ViewData[Foodzy.Utility.Blog.Constants.TotalPostCount].ToString(), out pageCount) ? (pageCount - 1) / settings.Value.PostsPerPage : 0;
The text was updated successfully, but these errors were encountered: