Really, ... PagedList.Mvc ... no takers on this topic? I don't blame you ... I broke my site TWICE now trying to implement this
YEAH ... good thing I'm all over version control or I'd be completely screwed by now. I've broken my site TWICE trying to implement this feature.
I tried working through a couple of tutorials creating a controller, model and view but can't get them to work (or not break my site ha ha ha).
This tutorial (from 2017) uses a package, PagedList.Mvc, that's outdated and he provides the bare minimum for creating the controller, model and view (including their contents ... I believe those are incomplete as well).
here's a link to Jon's the tutorial
This other tutorial (from 2016), by Paul Seal which is pretty advanced, is where that error appeared and broke my site ... the back office was wrecked ... some conflict with angular.js I believe.
here's a link to Paul's tutorial
So ... I'm at a loss ... and unfortunately under deadline (aren't we all).
Does anyone know of any other resources for building pagedlist features in umbraco ...?
I am using X.PagedList.Mvc - version 5.1.0.5000 (there is a reason why, but can't remember right now, sorry!) Edit - remember now, next version targetted .Net 4.6 which I'm not using.
I have a paged list property on my View Model, e.g.
public IPagedList<Transaction> PageOfTransactions { get; set; }
Yes, I started with PageList.Mvc until I saw the message on the project website - https://github.com/TroyGoode/PagedList - saying that it was no longer in development.
OK ... so, I couldn't get any of the previous pagedlist items to work for me.
HOWEVER, I did get this to work ... creates a paged list with bootstrap pagedlist controls.
Here's the code from a partial view I created should anyone need a solution that doesn't require a surfaceController-Model-View combination (although I'm sure that these are "cleaner" and more "elegant" solutions than what's listed here):
Really, ... PagedList.Mvc ... no takers on this topic? I don't blame you ... I broke my site TWICE now trying to implement this
YEAH ... good thing I'm all over version control or I'd be completely screwed by now. I've broken my site TWICE trying to implement this feature.
I tried working through a couple of tutorials creating a controller, model and view but can't get them to work (or not break my site ha ha ha).
This tutorial (from 2017) uses a package, PagedList.Mvc, that's outdated and he provides the bare minimum for creating the controller, model and view (including their contents ... I believe those are incomplete as well). here's a link to Jon's the tutorial
This other tutorial (from 2016), by Paul Seal which is pretty advanced, is where that error appeared and broke my site ... the back office was wrecked ... some conflict with angular.js I believe. here's a link to Paul's tutorial
So ... I'm at a loss ... and unfortunately under deadline (aren't we all).
Does anyone know of any other resources for building pagedlist features in umbraco ...?
Thank in advance for your help.
Hi Brett,
I am using X.PagedList.Mvc - version 5.1.0.5000 (there is a reason why, but can't remember right now, sorry!) Edit - remember now, next version targetted .Net 4.6 which I'm not using.
I have a paged list property on my View Model, e.g.
That gets populated in the controller like:
In the view, I loop over the list of transactions to diisplay them:
And the actual pager is created with this code (looks horrible!):
I think that's pretty much everything, sorry it's not a full-on tutorial. Hope that helps.
Thanks Gordon ... I really appreciate the help (especially the confirmation of the package and version you are using).
I'll go back over what I do have, and use your information here as a reference. Thanks again!
Yes, I started with PageList.Mvc until I saw the message on the project website - https://github.com/TroyGoode/PagedList - saying that it was no longer in development.
There's some basic example code on the X.PagedList GitHub page too - https://github.com/dncuug/X.PagedList
Excellent ...! Reviewing the page on github now, thanks Gordon.
OK ... so, I couldn't get any of the previous pagedlist items to work for me.
HOWEVER, I did get this to work ... creates a paged list with bootstrap pagedlist controls.
Here's the code from a partial view I created should anyone need a solution that doesn't require a surfaceController-Model-View combination (although I'm sure that these are "cleaner" and more "elegant" solutions than what's listed here):
Appreciate the help getting this far ... I hope this helps someone else.
is working on a reply...