Sort entries by customfield

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
tazilein
Regular
Posts: 56
Joined: Sun Apr 30, 2006 11:44 pm
Contact:

Sort entries by customfield

Post by tazilein »

Hi,

I try to use the customfields from the serendipity entryplugin the first time. I am presenting several apartments on a website based on s9y. I now want to add possibilities to sort the apartments (price, location, size, persons). These details I want to add by custom fields. I would need a possibility to sort all entries using customfield1,2 or 3 up or down.

Can this be done easily or is this some work of coding?
my S9Y-Blogs: my personal brainbackup | [url=http://www.viennacityflats,at]Vienna Apartments Rental[/url] | Kasperls Geschichten | various other Sites using S9y as CMS
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Sort entries by customfield

Post by garvinhicking »

Hi!

For that you need to change your template to use a custom {serendipity_fetchPrintEntries} call and make use of the extended API (http://www.s9y.org/78.html) to specify 'entryprops' and/or 'orderby' clauses for the database call.

And yes, it involves some work of coding...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply