Jump to content

Search the Community

Showing results for tags 'sort order'.

  • 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

Found 2 results

  1. Hello everyone, I am struggling a little bit with combining Isotope with Processswire. The functions themselves work nicely and I managed to give the sortable items their categories via a page field and now I also want to make the sort order manageable with a field instead of on the actual site, so the client can easily set the way they want their stuff ordered. I am using a Select Options Field and am giving the sortable elements an extra class with that, and that does actually work, looking like this: <h2 class="headline_article<?php if ($home->sortPreviews->value == "headline"){echo " is-checked";}?>"><?php echo $article->headline; ?></h2> The only problem I have is that for the headline I want the sort order to be ascending, but for the date I want it to be descending, and as far as I know with my 1 month of coding knowledge I can only set it as either or in the grid defining javascript. Which now basically looks like this: var $grid = $('.grid').isotope({ getSortData: { selectedCategory: '.is-checked', } }); $grid.isotope({ sortBy: 'selectedCategory', sortAscending: { selectedCategory: false, } }); is it possible to either check if the item that now has the class "is-checked" also has the class "date" and then to set the sort order to descending in that case while in any other it should be ascending? Or if not is there maybe a different way to approach the whole idea? Any help is much appreciated!
  2. 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 order is correct in the admin area, but shows up wrong on the home page. What am I missing?
×
×
  • Create New...