I am wanting to add pagination to a page on my website. I have got it working using razor..but I would like to do this through a surface controller as the site is going to be content heavy..
I cannot find no examples of doing this in a controller has anyone got an example???
Pagination
Hi ,
I am wanting to add pagination to a page on my website. I have got it working using razor..but I would like to do this through a surface controller as the site is going to be content heavy..
I cannot find no examples of doing this in a controller has anyone got an example???
Thanks
Nav
Hi Naveed,
It's not hard isuue to add pagination, but it will be perfect to use Examine for search node if you have a lot.
Can you show your code of getting data ?
Thanks
Hi alex,
I have not yet started it in the controller. In my razor view i am just getting the data through ipublishedcontent.
Do you have any sample code or link to some which shows pagination in surface controller
Thanks
Nav
this is my razor view. So i want to implement this into my controller somehow.
This is what I have in my controller so far:
This is my Model:
Thanks for this code - I used it to set up pagination in my blog. I'm doing it in the razor template for now, but may move it to a controller later.
Is it faster in the controller?
Yes it is faster. Its best to take approach of putting all logic in a controller.
Also, what is the Umbraco Constants? Is that part of the API (I can't find it), or something you created to set constants?
thanks!
What does your template/view look like?
Hey,
I was able to get mine working. Your code was useful, thanks!
is working on a reply...