Jump to content

Search the Community

Showing results for tags 'sort'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hi everyone, I'm wondering what the best way to sort a page by date is. I have a few pages that render a list of pages based on specific criteria, e.g. template. I want to provide 2 date pickers on each of those pages to allow users to search by date range on that specific page. I'm wondering what the best way to go about it is. The date has formatting attached to it. I'm wondering if I should use the unformatted version instead of the formatted one. Would this make it easier to work with in this situation? I was thinking of using jQuery UI datepickers and a button to submit the form and apply the date range filter to the results that are rendered on the page. if($page->id == 1) { $events = $pages->get("name=event")->children; } else if($page->name == 'users') { $events = $pages->find("created_users_id=$username, template=log-item"); } else { $sort_type = $page->template; $events = $pages->find("$sort_type=$page"); } if(count($events)) { foreach($events as $event) { // ... } } The date I will be working with has been stored in the $page->date_start field. Currently it is formatted using ProcessWire's options. I'm wondering what the best way to tie date filtering functionality into the above query would be, if even possible, and if not, which way should I go about doing it? Thanks!
  2. I have a problem with sorting in templates. On my local machine I have IIS with MySQL 5.5.8 and everything works fine (sorting children in admin based on global fields and custom fields (name, title, ...). On my VPS that has MySQL 5.0.95 installed sorting doesn't work at all. I've tried it on another dedicated server that has MySQL 5.1.63 installed and it doesn't work either. Could it be the problem with that version of MySQL's? Sorting in template code (PHP) works fine. Also, I can rearrange children (although sort has been set) and no warning window pops out. On my local machine I get warning that I can't manually rearrange children bacause sorting was set with some particular field. I read this topic and there was sort problem with MySQL 5.0.51. I've installed new PW install on my VPS to confirm that it doesn't have anything to do with project I'm working on, and the sort problem persists.
  3. First of all, my congratulations to Ryan on this amazing piece of software! This is my first post in these forums, but I have been a silent noob for a few months, learning while using processwire for every web project in the Multimedia Design course I'm currently finishing! On to the bug/problem (is this the right place for this post?) : When I try to sort a PageArray object using the $a->sort() method on a string field, say, the title, the API places the ones starting with uppercase first, and the lowercase last, like so: A,B,C,D,a,b,c,d... Am I doing something wrong/missing something? Cheers, Tiago
  4. Couldn't find another topic on this, so I'm creating a new one. My idea (wish, if you wish.. no pun intended) is actually quite simple: wouldn't it make sense to enable sort order setting for templates in addition to individual pages? That way I wouldn't have to re-set sort order every time I create, for an example, a news page (which can only contain news items and thus has pretty much only one usable sort order throughout the site.) Also: current default sort value for new pages is "none", which can produce quite peculiar effects - apparently because DB itself uses some very obscure magic for deciding sort order - and I'm having hard time figuring out why anyone would wish it to act like this. As a second idea, wouldn't it be nice if default sort order was "created" instead of "none"? So - what do other folks think about these? Oh, and by the way, if there already IS a way to achieve one (or both) or ideas above, that'd be great (and in that case, sorry for the confusion!)
  5. Hello! I'm having a strange issue in only one of my PW sites with the manual sorting of pages. I can't sort pages manually in the admin anymore! I have a group of pages in the site that have manual sorting in their parent's settings and PW let's me drag drop pages around. Everything stays in place the way I want, and no errors arise, but when I reload the page the sort change are not saved and everything stays in the same same. Maybe I'm missing something here cause I'm stuck!! I had some issues with this server provider (in my last two forum messages) so I am betting this can be the cause. I'm using PW 2.2.0 (should I try an upgrade?) Any clues?
×
×
  • Create New...