Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

New to modules, having issues making a very base one


Go to End


744 Views

Avatar
Rudiger

Community Member, 8 Posts

2 April 2016 at 12:30am

Hi,

I'm new to SilverStripe and have done a reasonably detailed template very easy. However I need to create a module for what I'm working on and am having no luck. If there are some good tutorials out there I'd be happy to look through them, the ones I've found are either out of date or look at getting module function from within the template

I've created a module at the root and basically have:

class Test extends LeftAndMain {
	static $url_segment = 'testAdmin';

	static $menu_title = 'Test Admin';

	private static $url_handlers = array (
		
		'panel/$ID' => 'handlePanel',
		'$Action!' => '$Action',
		'' => 'index'
	);

	private static $allowed_actions = array();

	public function init() {
		parent::init();
	}

}

and have a template at test/templates/Includes/Test.ss

I get the item in the left menu however trying to change to say pages does nothing anymore and the template doesn't work. Could someone help as to where I've gone so wrong?

Cheers.