Search the Community
Showing results for tags 'sort'.
-
Find Merge Adds a Pages::findMerge() method that allows multiple PageFinder selectors to be merged into an efficient paginated set of results. This can be useful when you need more sophisticated sorting of results than what would be possible using only the sort value in a single $pages->fin...
-
Hello, I have a separate sort dropdown and filter section. This is very similar to the processwire demo - https://demo.processwire.com/search/?sort=parent.name I also have the same "issue" if you would call it that where i can sort or I can filter, but I can not do both. This is because th...
-
Repeater Easy Sort Adds a compact "easy-sort" mode to Repeater and Repeater Matrix, making those fields easier to sort when there are a large number of items. The module also enhances Repeater Matrix by allowing a colour to be set for each matrix type. This colour is used in the item header...
- 10 replies
-
- 16
-
-
-
How might I programmatically output images from an Image field from another template in descending order? I want to reverse the order of images on the front-end page (see code below). I want to keep the order in ProcessWire Admin. The Image field accepts multiple images. Code:...
- 2 replies
-
- image field
- template
-
(and 2 more)
Tagged with:
-
Hello all, My page has a lot of images. I created a gallery_image field to upload and display them. Unfortunately they are sort of unordered in the backend, though the filenames are numbered sequentially. I understand that this reflects the order of finished uploads. I figured out how to sort them...
-
First the structure (offtopic, Structure reminds me of EE ) Home -Company Page --Section (template: container) ---Child page 1 (template: content) ---Child page 2 (template: content) ---etc. I have editors that can add pages to template container, but not edit the page. Problem is that they ca...
- 2 replies
-
- 1
-
-
- sort
- permissions
-
(and 2 more)
Tagged with:
-
Hi, trying to order pages by modified date, date. I can do 'sort=-date_modified, sort=-date' but that will always put the modified date first regardless of actual date order. I just want to coalesce the two fields and sort. Any ideas would be appreciated.
-
I'm having trouble with sorting by repeater count. We have awards given to each work and the awards are in a repeater. Doing "sort=-awards.count" However it isn't working. Anyone got any ideas?
-
Hello, i need to sort $pages by the first letter an show on the page like A - Aname Page - Aname Page - Aname Page - Aname Page B - Bname Page - Bname Page - Bname Page - Bname Page How can i check which is the first letter from the page.title ?? Tn...
-
What's the easiest way to retrieve a PageArray -- with an offset and a limit, for use in paginated search results -- that is sorted by title using PHP's SORT_NATURAL instead of alphabetically? I was hoping there was a config setting or API method that would handle it for me, but if there is, I haven...
-
I have done a bit of searching, but I can not seem to find an actual answer. I have a list of services as child pages under "Services". I can output the services just fine, but I cant wrap my head around how to group them "alphabetically" like: Services A - Service "A" 1 - Service "A...
-
Hi all! I have a little problem here. I want to sort a list of addresses by streetname and then by number. First, I just had a field "prod_objekt" (address) containing both and then have a foreach loop like this: $pages->get('/produzenten/')->prod_repeater->sort('prod_objekt') as $produzent. Un...
-
Hello, I'm facing an issue with my page fieldtype. Pages appear in the order they were created although I'd like to see them sorted in alphabetical order (by title). The pages are well-sorted in my tree, but in that particular Page fieldtype (on another page), I can't find any place where I wou...
-
Hi all! I want to sort child-pages by two fields but I don't know if it is possible within one selector or if I have to make two separate queries <?php foreach ($page->children('sort=checkbox, sort=-number') as $child): ?> I want to keep 'checked' pages on top and sort them and all following...
-
I use pagination modul. I have a field which has born year info. But I put the years with sign "-" for BC (Before Christ). my selector sorts like as text. -384, -4, -412 .. it must be: -412, -384, -4 selector: $pages=$page->children("limit=60, sort=date_field"); I want to order m...
- 5 replies
-
- pagination
- selector
-
(and 1 more)
Tagged with:
-
Dumb question coming up. I can't get sorting to work. I show child pages (posts) of a parent page (news) on the homepage with this in the template: $news = $pages->find("template=post"); foreach($news as $post) { ... Sort order setting in the template or page is apparently ignored. The sort...
-
Hi! I've got a page with text area where user can check some codes divided by space, semicolon or comma. I can use two solutions to search for these codes: First method: $prCodesArray = preg_split('/[\\s,;]+/', $prCodes, -1); $selector = "title=" . implode("|", $prCodesArray) . ",...
-
This must be simple, however, I couldn't figure out how to do it. I got this structure in the admin tree: Page 1 [Template A] Children 1-1 [Template B] Children 1-2 [Template B] Children 1-3 [Template B] ... Page 2 [Template A] Children 2-1 [Template B]...
-
Hi, I'm sorry if this has been adressed before but I couldn't find anything about it. I'm pretty new to processwire but not to php or object developpment. I'm working on a blog and the request was to add a custom date field on articles that allows the user to override the "date" associated to t...
-
hi. i have a selector like this: $result = wire('pages')->find("template=xx, field_x=439|417|456|402"); now i need the $result sorted exactly like the values are commited in field_x. How to do this? thanks, martin
-
I have a PageTable field that is updated via a custom module. Pages are updated by deleting them then re-adding but crucially need be re-added in the same order in the PageTable field. If I re-add pages, they go to the bottom of the field (it's a manual drag n drop setting). Is there...
-
Hello, on a brandnew 3.0.35 install, I get wrong results for $page->sort. My structure is like Home -level1-1 -level2-1 -level2-2 -level2-3 -level1-2 -level1-3 When I do foreach($homepage->children as $child) { echo $child->sort; } It gives me: 3, 4, 5...