[eluser]jazbek[/eluser]
I figured out the problem. I had set up a YAML file for my pages table (which is the one that I want to load by default), and that YAML file had all the directives set inside it. However, the example.php controller was loading a YAML file for only the form_setup directive, so when I replaced the file name with my pages YAML file, it was causing a php error.
I figured out a strange way to load some of the directives in a php array and some in a yaml file:
Code:
class Pages extends codexController
{
function Pages ()
{
// Load the CodexController
codexController::codexController();
$config = array(
'db_table' => 'pages', //The name of the table associated with this controller
'controller_name' => 'Pages', //The name of the controller, so that it can be used when generating the URLs
);
$this->setConfig(array_merge($config, $this->spyc->YAMLLOAD($this->codexadmin->getDefinitionFileName('pages'))));
}
}
...for some reason it wasn't letting me specify db_table and controller_name in the yaml file (I was getting a spyc error). Is there any way to put all these settings in the yaml file or do I have to do it this way?
Thanks!