sorting rows of content

General project discussion. NOT for help questions.
Post Reply
blackhawk
Power Poster
Power Poster
Posts: 280
Joined: Mon Oct 20, 2008 6:07 pm

sorting rows of content

Post by blackhawk »

How hard is it to sort rows of content based on a column value with cmsms?

for example if i had the following html layout....

name  age  gender
jack    12    m
jill        11    f
joe      12    m
danny  10    m


and lets say i want to filter this by the age of 12, the result page will show me....

name  age  gender
jack    12    m
joe      12    m

Is this possible without building a php /  smarty class function from scratch?  What would be the best way to go about this?

Thanks
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: sorting rows of content

Post by spcherub »

If this data comes from a database, you should filter is at source (in your SQL).

If the data is hard-coded into the HTML, you could use something on the front-end (JavaScript) like:
http://plugins.jquery.com/project/uiTableFilter or
http://www.datatables.net/

Googling "jquery tables filter" will given you several more options.

S
Post Reply

Return to “General Discussion”