WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

sorting by custom field

Version: 4.0.39
printPrint


sorting by custom field
hai
Forum Regular
Avatar

Usergroup: Customer
Joined: Apr 03, 2007
Total Topics: 68
Total Posts: 268
Posted 09/09/07 - 02:52 PM:
quote post
#1
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

High Aspirations, Inc. - Web Site Design & More
http://www.highaspirationsinc.com/

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 312
Total Posts: 1032
Posted 09/09/07 - 08:36 PM:
quote post
#2
Although I haven't tried it myself, I would guess that you just add an option?

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



Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 09/10/07 - 03:36 AM:
quote post
#3
Yes, that's how it works.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
hai
Forum Regular
Avatar

Usergroup: Customer
Joined: Apr 03, 2007
Total Topics: 68
Total Posts: 268
Posted 09/10/07 - 08:48 AM:
quote post
#4
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.

High Aspirations, Inc. - Web Site Design & More
http://www.highaspirationsinc.com/

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.