Hi All,
I have been asked to include in a site that i am doing a ladder of competition results for a football team. So it will need to have about 15 teams listed with their current leadership points for the season but then ordered so that the team winning is listed first.
I want to make this as easy as possible for the client to do without making a table in the content area that they would swap things around and move things etc. this would be too messy and they would be on the phone to me every 5 minutes to fix it up!!!
Is there a dynamic way for TV’s to be linked to eachother and then be sorted according to their value?
ie if team1 has a value of 50 and team2 has a value of 45, team1 would be shown in the first row (tv tags set in the template) and conversely if team1 was 45 and team2 was 50 then the team2 row would move to the first line.
Due to the small amount of data that needs sorting I don’t think doing it as a Newslisting or ditto would be practical having 15 pages for this one table, I’m sure that someone out there is smarter than I at working this out?!!
thanks for your help.
thanks Andy,
all sounds good if I had any idea what you’re talking about!!!
I know HOW to use snippets, TV’s, chunks and html but I don’t know how to write a snippet!
cheers,
Paul.
p.s. Uncle Bubba’s Team???!!!!!!!
You have a few ways of doing this in MODx. 1) the above suggested method, 2) use MODx documents and Ditto to create the table, 3) add a TV for each team and use a snippet to do the sorting (several ways to do this with basic php), 4) custom db table and snippet to display...there are more.
If the number of teams is small and will not grow using TVs may be a good solution. Are you only storing the final points, or will this be a table with the points history (game 1, game 2,...)
Anyway, seems that you got it resolved.