SORT BY TEXT LINKS

11 posts by 3 authors in: Forums > CMS Builder
Last Post: July 31, 2009   (RSS)

By weblinks - July 24, 2009

You may get a prior UNCOMPLETED POST...It just disappeared on me before I was finished.

I wish to post TEXT LINKS to SORT the MULTIPLE LISTINGS on the following page.... http://www.linkvermont.com/realestate.php [Right Column under "Featured Properties"]

These Links would give the VISITOR the ability to SORT BY TOWN and SORT BY PRICE, not unlike sites like Staples that allow you to sort by price [high and low] or sort by brand, etc. I ALREADY HAVE THE FIELDS: price and property_location.

I need to know the CODE and LOCATION to paste it, etc. Do I need to change anything in the ADMIN SECTIONS, ETC.????

As you know I am not a tech person, I'm a designer. I will appreciate any help you can provide asap.

Thanks Much!!! Bob T.

Re: [weblinks] SORT BY TEXT LINKS

By ross - July 24, 2009

Hi Bob

Thanks for posting. What I think would work best is three links just under the Featured Properties heading. One that says "Sort by Town", "Sort Asc Price" and "Sort Desc Price". The actual links could be anything you like.

When you click any of them, the page reloads and the listings will re-order based on the link you clicked.

Does that sound like it would work? I can give you the code to do that and then you can copy and paste it into your page. Would you mind posting a copy of that page for me to go over?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [weblinks] REPLY SORT BY TEXT LINKS

By weblinks - July 24, 2009

Ross....

Did you receive the file you requested????

My email shows a message from you at 1:11 pm, but I see no message???

Bob

Re: [weblinks] REPLY SORT BY TEXT LINKS

By Dave - July 27, 2009

Hi Bob,

Allowing the user to specify a sort order is a little tricky. One way you can do it is to specify the sort order in the orderBy option like this:

'orderBy' => 'price DESC',

Which means "sort by price in descending order" and then create duplicates of the page with different sort orders (realestate_price.php, realestate_address.php). Then you could have your sort links link to those pages.

Let me know if that would work for you.

Also, please create a new thread for new questions so we don't get confused! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] REPLY SORT BY TEXT LINKS

By weblinks - July 27, 2009

Dave....

What I really need is the LINKS Ross was going to send to me.... See copy of his message to me below concerning Sort by Price and Sort by Town.

COPY.... [ALSO ABOVE]

[font "Verdana,Arial,Helvetica"]Re: [weblinks] SORT BY TEXT LINKS [[url "http://www.interactivetools.com/iforum/P73253#73219"]In reply to[/#003366][/url]] [font "Verdana,Arial,Helvetica"][url "http://www.interactivetools.com/iforum/gforum.cgi?do=post_reply_write;quote=1;parent_post_id=73225;t=search_engine"]Quote[/#003366][/url] | [url "http://www.interactivetools.com/iforum/gforum.cgi?do=post_reply_write;parent_post_id=73225;t=search_engine"]Reply[/#333366][/url]
[font "Verdana,Arial,Helvetica"]Hi Bob

Thanks for posting. What I think would work best is three links just under the Featured Properties heading. One that says "Sort by Town", "Sort Asc Price" and "Sort Desc Price". The actual links could be anything you like.

When you click any of them, the page reloads and the listings will re-order based on the link you clicked.

Does that sound like it would work? I can give you the code to do that and then you can copy and paste it into your page. Would you mind posting a copy of that page for me to go over?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Re: [weblinks] REPLY SORT BY TEXT LINKS

By Dave - July 27, 2009

Hi Bob,

There's a few ways to do it, I'm not sure exactly what code Ross intended to send you... But here's another way:

Add this to your viewer at the top (new code in red):

// set orderBy
if (@$_REQUEST['order'] == 1) { $orderBy = 'town'; }
else if (@$_REQUEST['order'] == 2) { $orderBy = 'price'; }
else if (@$_REQUEST['order'] == 3) { $orderBy = 'price DESC'; }
else { $orderBy = 'RAND()'; }


list($featured_realestateRecords, $featured_realestateMetaData) = getRecords(array(
'tableName' => 'featured_realestate',
'perPage' => '5',
'orderBy' => $orderBy,
'allowSearch' => '0',
));


The create some links:

Order by:
<a href="?order=2">price</a>
<a href="?order=3">price descending</a>
<a href="?order=1">town</a>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] REPLY SORT BY TEXT LINKS

By weblinks - July 30, 2009

Dave....

This IS NOT WORKING... I'm attaching the page I have placed the code on... FURTHER, PLEASE look at is online... also see error message here....What am I doing wrong????? I' ve been trying to resolve this since last Thursday... PLEASE REPLY ASAP. See ATTACHED!!

ONLINE AT: http://www.linkvermont.com/realestate_TESTSORT.php

Regards,

Bob

Re: [weblinks] REPLY SORT BY TEXT LINKS

By Dave - July 30, 2009

Hi Bob,

Can you re-attach the file? It didn't come through. Be sure to click "Upload" before "Post". Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] REPLY SORT BY TEXT LINKS

By weblinks - July 30, 2009

File attached !



Bob
Attachments:

realestate_testsort.php 16K