Hi,
I am following the advice given in this thread:
http://www.silverstripe.org/general-questions/show/20711
"You can execute a controller function using the the $Page/$Action/$Parameter url pattern, where $Page is the URL, the $Action is the name of the controller function and $Parameter is an variable you may need to push."
Therefore I am attempting to call a controller function as follows:
http://127.0.0.1/silverstripe/index.php/homePage/test/
In my Page.php I have the following:
<?php
class Page extends SiteTree {
private static $db = array(
);
private static $has_one = array(
);
public static $allowed_actions = array (
'test'
);
public function test(){
echo "hello world!";
}
}
class Page_Controller extends ContentController {
private static $allowed_actions = array (
);
public function init() {
parent::init();
Requirements::themedCSS('reset');
Requirements::themedCSS('layout');
Requirements::themedCSS('typography');
Requirements::themedCSS('form');
}
}
This is a fresh install of version 3.12, it couldn't be any more rudimentary - the output I get is "Page cannot be found".
Any suggestions?
Thanks,
Alan.