Jump to:

23364 Posts in 18125 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Routing - issues replacing ModelAsControler

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

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

Page: 1
Go to End
Author Topic: 336 Views
  • martimiz
    Avatar
    Forum Moderator
    1067 Posts

    Routing - issues replacing ModelAsControler Link to this post

    Hi,
    Basically I understand how the new yaml routes should be working. But the current issue baffles me. What I'm trying to do is use a different controller instead of the current ModelAsController. So someting like

    rules:
    '$URLSegment//$Action/$ID/OtherID': 'MyModelAsController'

    this works very well, placing the fragment After: framework#coreroutes, just like the docs suggest. But now other urls like admin and dev are unaccessible. Of course 'After' may be anywhere after, so there should probably be a 'Before' as well. I'm thinking before framework#coreroutes.

    But whatever I try, it always results in an error saying that two fragments want to be after each other. There's hardly any combination I didn't try, including renaming my module from aaa to zzz. I did trace the order in which the rules are parsed based on the output from ConfigManifest, but I just don't seem to be able to exactly position the fragment.

    What am I missing?

    336 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.