Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Hi all,
I'm just wondering what is the best way to handle updating a league table in CouchCMS?
My league table is made up of 18 teams and has number of games played, won,lost, drawn, goals scored, goals against, goal difference and number of points.

Currently the way it is done (before migrating to couch) is that I have to manually edit the data for each team in the mysql database (bit of a chore).

Any advise is greatly welcomed. Example output is below.

Code: Select all
                       P   W   D  L   GF  GA  GD  Pts
  Brora Rangers   35  31  4  0   120  25   95   97
  ........
  Wick Academy   35   1   3  31   26   79  -53   6   
Hi,

Not sure how you have structured your site in Couch (e.g. are the teams, games etc. setup as templates etc.) but if it is simply an 'editable' table that you want I suggest you please use 'repeatable-regions' (http://docs.couchcms.com/concepts/repea ... gions.html) to create one.

For example, define 'Team Name', 'Played', 'Won', 'Lost' etc. as editable regions.
Create a row for each team ('Team name' field) and use the remaining fields for the other data - kind of an Excel spreadsheet.

Do you think this would help?
Thanks for the reply.
This looks like it'll be the best way to solve the problem. Will give it a try and report back.
I assume it will show all the entries (18 teams) on one page so that it can all be edited at one time rather
than page by page per team. I want to make it simple for other people to change things so that I can walk away
if I choose and not be hassled.

EDIT: Did a secondary search on ordering repeatable regions and that doesn't seem possible. Is that correct?
I need the ordering to be desc point, desc goal difference, desc team name.

Ian
Ian,

I presume you are looking for sorting the rows on the front-end (as opposed to the admin-panel where we do the data entry).

If that is so, I'd suggest you use <cms:show_repeatable> to output the rows in a tabular format and then deploy some JQuery addon (there are several around) that would make the table sortable by columnar data.
4 posts Page 1 of 1

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests

cron