Skip Navigation

[Resolved] School Sports Game Schedule & Scores

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 1 voice.

Last updated by Scott Roberts 7 years, 3 months ago.

Author
Posts
#549673

I am setting up a multi-sport high school enthusiast site. What I want is functionally similar to hidden link

Each school has a team for one or more sports. Each team may be part of a different state classification (class) and/or a different league. So far I've setup Schools as a post type, with sport, class and league as tag-style taxonomies.

Now I'm trying to setup schedules. Seems to me the logical unit of a schedule will be the Game. Creating a game post type is simple. But I need to select two competitors for the game, or enter the entire schedule for one school (so the first competitor is always the same) . How can I create that one-to-many relationship?

Example of a team schedule in the system we're coming from: hidden link

Example of the schedule for one night across all leagues and classes:
hidden link (use the date control to go back to 9/9/2016)

An example of the school post type, FWIW, is at hidden link

#549678

I think I've figured it out using the many-to-many instructions. Going to try it that way and I'll be back if it didn't work.

#550152

So far, I understand the instructions at https://toolset.com/documentation/toolset-training-course/part-9-many-to-many-relationships-in-toolset/ -- where I'm hitting the problem is needing both sides of the many-to-many coming from the same table

It seems what I'm trying to create would look something like this:

school (1) ----------> (N) season (1) --------> (N) game (N) <---------- (1) season (N) <-------- (1) school

An example of this in paragraph form:
The school Arvada has a season named 2017 Football, whci has multiple games. In one of those games they play the school Flagler. The next game they play the school Sterling. Limon woudl play each of the others, and Flagler and Sterling would also play each other.

This nets a 2017 Football season for each school that resembles this:
Arvada
week 1 Flagler
week 2 Sterling
week 3 Limon

Flagler
week 1 Arvada
week 2 Limon
week 3 Sterling

Sterling
week 1 Limon
week 2 Arvada
week 3 Flagler

Limon
week 1 Sterling
week 2 Flagler
week 3 Arvada

Given that we need to report a score (actually, several scores as the game progresses), it seems to me the game is the central connections. But how to build the others?