How I can get a button like - all resources?
Any ideas?
Of course solution need with getPage.
What version of MODX?
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html
I'm not clear on what you want, but it sounds like you want to call getResources with a getPage tag. If you specify the parent as 0, you should get all resources on the site. You might want to set a "where" clause with published set to 1 so you get only published resources.
What do you want to display for each resource? If it's just the pagetitle, a custom snippet called in a getPage tag would be faster.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html
I want to see in frontend/site next buttons
|<< < 1 2 3 4 5 > >>| all
all - means that the all elements of category will be displayed, in one page.
[ed. note: alex_dutch last edited this post 14 years, 7 months ago.]
Resources don't have categories, so I don't think that's going to work.
Whatever you do, I'd recommend getting it working with just getResources first and worry about pagination with getPage after you get it right.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html
I mean that the "category" is container(folder of resources).
I've try to explain more widely:
Then you use paginate(use getPage) you have on page some(&limit) list of resources.
Sometimes you need to see ALL resources instead of limit.
I need some solution that show ALL resources in this page, that use a getPage.
Like:
first previous 1 2 3 4 5 next last all
-
MODX Staff
- 10,725 Posts
Just set the limit to something higher than the total. Allowing an unlimited limit might seem useful, but there should always be a limit when iterating through objects like this.