Webmastersite.net
Register Log In

sorting by custom field

Comments on sorting by custom field

hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 09, 2007 - 5:52 PM:

Sorry to be a pest for a second time today, but I have another question I cannot seem to find an answer to w/in the manual or forum.

I have found how to have my links sorted by default from w/in the admin area, but what I would like to do - if possible of course - is to give my visitors the option of changing the sort order for that new field. So right now when you click on a category you get a drop down which lets you sort by Newest, Last Edited, Title, etc. How can I add my new field to that list to let visitors sort by that field if they so choose?

Thanks in advance for your help.

Marilyn
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 09, 2007 - 11:36 PM:

Although I haven't tried it myself, I would guess that you just add an option?

<option value="fieldname">description</option>



Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Sep 10, 2007 - 6:36 AM:

Yes, that's how it works.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 10, 2007 - 11:48 AM:

Thank you both very much.

I had actually tried what you suggested, except I was substituting value="fieldname" for value="[FIELDNAME]" which was giving me an error. Changed it to lower-case and removed the [] and worked perfectly. Thank you.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.