Record Sort By Questions

5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 17, 2012   (RSS)

Hi, I am new to CmsBuilder.

Is there a way i can display a list of records, with a sort function on the top of the page? Like sort by zip code, sort alphabetically?

www.aavwi.com/seen_stream/list.php is where i would want that functionality.

Re: [shawnpatoka] Record Sort By Questions

Hi,

There is a simple way to do this. You just need to pass over a orderBy variable in the URL with the column you want the data sorted by from the table. So you could have some links or a form at the top of your page that will pass over the order. Maybe something like this:

<!-- Assuming the zip code table column is called zipCode -->
Sort By: <a href="?orderBy=zipCode" >Zip Code</a>


If your using a getRecords function to get the data from the table, it should then order them by the column you passed in the URL automatically.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com

Re: [shawnpatoka] Record Sort By Questions

Hi,

This isn't a feature that comes as standard with CMS Builder, but there is a geocoder addon you can buy that will provide this exact function:

http://www.interactivetools.com/add-ons/detail.php?Geocoder-1034

Thanks
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] Record Sort By Questions

kk, sounds good. thanks for your help