Page 1 of 1

sorting rows of content

Posted: Mon Oct 11, 2010 6:12 pm
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

Re: sorting rows of content

Posted: Mon Oct 11, 2010 9:26 pm
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