Can I do something complex, see text, with league tables?
-
First, let me say all league tables for each individual league work fine. But now I want to do something a little more advanced.
Our club has 5 youth teams and 1 adult team. Each has it’s own competition, page and its own league table. All our teams are listed under ‘Clubs’ as are ALL their competitors and we build a semi automated script to import all results each week, so everything goes smooth.
But now I want to take just our 6 own teams, from various competitions, list them in a table to use in a widget that shows stuff like position and win streaks (‘form’). This way we can have a fairly small part on the homepage highlighting our own teams, with the bigger and complete league tables of each individual team in their own section.
I managed to create a league table with manually selected teams (our 6 teams) from 6 different competitions. I can select which columns to show. It is almost perfect except from one thing…. It sorts the table by position, acting as if these 6 teams would compete with each other, which they are obviously not, since they are in 6 different competitions. Instead I want them to stay in a fixed position, no matter the results, most likely in order of seniority. Something like
-
Pos Name of team Score Winstreak
1. Adults H1 23 Points W W L L W
2. Youth u17 (A) 17 Points L L D L W
3. Youth u15 (B) 37 Points W W W W W
4. Youth u13 (C) 19 Points W D L D Letc
The Pos column is not wanted, but its autogenerated as part of the league table code, we can live with that as long as we can fixate the order
Instead we get now:
-
Pos Name of team Score Winstreak
1. Youth u15 (B) 37 Points W W W W W
2. Adults H1 23 Points W W L L W
3. Youth u13 (C) 19 Points W D L D L
4. Youth u17 (A) 17 Points L L D L Wetc
So to summarize, the table is created fine, with all the information I want but the order shifts around based on their score.
Is this possible to change to a fixed position? In fact I wouldn’t mind if the whole Position column could be gotten rid of, as it is not needed, it;s not a real ‘standings’ table after all, just a summary of our own teams performances.
If this result can be found outside of the ‘league table’ code that would be fine too, as long as I can include those fancy Win Loss Win Win Draw bits.
The topic ‘Can I do something complex, see text, with league tables?’ is closed to new replies.