2009/12/3 Michael C. Harris <[email protected]>:
> 2009/12/2 Michael C. Harris <[email protected]>:
>> I have a content type representing a magazine issue, that are returned
>> through a custom rewrite rule. It saves the year of publication in the
>> postinfo table. When displaying the posts, I want to display them in
>> year order and grouped by years. Is this possible using Posts::get() ?
>> If not, does anyone have any recommendations on how to do it ?

As of r3855 this can now be done with:

$posts = Posts::get(array(
  'content_type' => Post::type('imprint'),
  'has:info'=>'year',
  'orderby' => 'info_year_value DESC',
  'limit' => $limit,
  'offset' => $offset,
));

Thanks for the commit, Owen.


-- 
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev

Reply via email to