Okay, so i already have a SS site up and running. It's ideal for a rather basic website but...
Now i want to take it to the next step and i'm totally lost. I've been playing with Tutorial 5 and it works great but it's to complex for what i want and i don't know how to 'rip' it. I've been playing with ModelAdmin as well but i guess i could use some more documentation on that.
Here's what i want. A TVserie database.
- A serie has Several seasons (1-to many ?)
- A Season has several episodes (1 - to many ?)
- An episode has 1 serie and 1 season ( or is this not nessasary?)
So i want to select a serie -> go to the seriepage -> choose the season -> get a list of episodes
I did make the seriepage ,seasonpage and episodepage resulting in 3 tables
class SerieAdmin extends ModelAdmin {
public static $managed_models = array(
'Serie',
'Season',
'Episode',
);
static $url_segment = 'series';
static $menu_title = 'My Serie Admin';
}
class Serie extends DataObject {
static $db = array(
'Title' => 'Varchar'
);
static $has_many = array(
'Seasons' => 'Season',
);
}
class Season extends DataObject {
static $has_one = array(
'Serie' => 'Serie'
);
static $has_many = array(
'Episodes' => 'Episode'
);
static $db = array(
'Name' => 'Varchar',
);
}
class Episode extends DataObject {
static $has_one = array(
'Season' => 'Season'
);
static $db = array(
'Name' => 'Varchar'
);
}
-----------
But now i'm totally lost, where to go now to display it all the way i want.???