i'm pretty new to SilverStripe and need some help with custom URLs.
I have the following structure:
now i'd like to create the following "behaviour":
1: if the user tries to visit "section2" directly ("mypage.com/section2") and no specific page,I
he should see "section1" ("mypage.com/section1").
2: otherwise - if he calls a specific page of "section2" ("mypage.com/section2/aPageOf2") - there should be no redirect and he gets to the page
What am i looking for?
1. Some conceptual help: What would you use to create such behaviour and why: A custom controller class? a rule in _config ? Some function in the section2_controller class?
2. Some practical help: I'd be glad to get a code snippet from you, since php coding is not my main skill.