Skip to content

Instantly share code, notes, and snippets.

@hafriedlander
Created December 14, 2011 22:32
Show Gist options
  • Save hafriedlander/1478872 to your computer and use it in GitHub Desktop.
Save hafriedlander/1478872 to your computer and use it in GitHub Desktop.
SS3 configuration system blog post example 1 - existing configuration
<?php
Director::addRules(50, array(
'admin/cms//$Action/$ID/$OtherID' => 'CMSMain'
));
Director::addRules(1, array(
'$URLSegment//$Action/$ID/$OtherID' => 'ModelAsController',
));
<?php
Director::addRules(10, array(
'$Controller//$Action/$ID/$OtherID' => '*',
));
// Add default routing unless 'cms' module is present (which overrules this with a CMSMain controller)
Director::addRules(20, array(
'admin//$action/$ID/$OtherID' => '->admin/security'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment