Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Root URL Classname Conflict

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

Page: 1
Go to End
Author Topic: 374 Views
  • bliles
    Avatar
    Community Member
    1 Post

    Root URL Classname Conflict Link to this post

    Our site is using SS 2.4, and we're preparing to migrate to 3.0. Our information architecture design has caused us to hit the limitation for root URLs that they cannot be the same as a class name for one of our root URLs. Just wondering if you could give any background on why this limitation is imposed, this will help me determine the best way to work around it.

    Thank you very much for your help, and thank you for your tremendous work on this product.

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Root URL Classname Conflict Link to this post

    The urls in SilverStripe are controlled by routes. You would have seen Director::addRules() and routes.yml files around the place / mentioned in the tutorials. One of these core routes built in is for $ClassName to access the controller class (e.g Security/login goes to Security controller). Normally you have your controllers named FooController or BarController so conflicts are unlikely but you could setup your routes so that the given url you want has a higher priority than the built in route.

    http://doc.silverstripe.org/framework/en/reference/director#routing

    374 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.