Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add controller_name config var to SiteTree for easier override #2115

Merged

Conversation

andrewandante
Copy link
Contributor

Currently you can do this by overriding the getControllerName() method but this feels more idiomatic. Means that you can more easily do things like put your controllers in a MySite\Control namespace and have your pages in Mysite\Model. Additionally saves having to do the while loop if you don't have to - could be an aim to have this as required by 5.0 to reduce unnecessary cycles (and ✨ magic ✨ ).

@andrewandante andrewandante force-pushed the pulls/4/add_controller_name_config_var branch from 8464e28 to 1ac1ea7 Compare March 1, 2018 15:52
@dhensby
Copy link
Contributor

dhensby commented Mar 1, 2018

see silverstripe/silverstripe-framework#6549

@chillu
Copy link
Member

chillu commented Jul 23, 2018

Awesome work Andrew! I'm asking to get this documented in a wider context as well: silverstripe/developer-docs#32

@chillu chillu merged commit 262236c into silverstripe:4 Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants