23355 Posts in 17744 Topics by 2862 members
|Go to End|
4 May 2010 at 10:57pm Last edited: 4 May 2010 11:17pm
is it possible to rename the 'home' page to 'Welcome'?
I've renamed it in the CMS, but when I run a dev/build SilverStripe shouldn't think: oh 'home' page is missing, lets create one.
When I rename 'home' in the CMS to 'Welcome' it must be recognized as the home page So after dev/build it shouldn't create 'home' again.
Is this possible?
5 May 2010 at 10:23am
This is unfortunately caused by the Require default records function of SiteTree. It may be possible to over-ride this function with a decorator. Or, if you don't mind editing core files, you could just delete it! But that is naughty.
Hope that helps
24 August 2010 at 12:44pm
I also need a solution for this. Has anyone created a working hack for this?
24 August 2010 at 8:26pm
It should only create a Homepage when no page with the URL 'home' is found. As long as you leave the page with the URL 'home' (note the URL is normally rewritten to / anyway) it will be fine. When renaming the page to 'Welcome' just click cancel on the change URL prompt. If you want to change the URL to welcome as well your asking for trouble.
24 August 2010 at 8:34pm Last edited: 24 August 2010 8:36pm
You can add SiteTree::set_create_default_pages(false); into your config.
But if the URLSegment 'home' isn't found in the SiteTree, SS will redirect to the first page e.g. 'welcome'. So it is better to maintain the Welcome Page with the URLSegment 'home'.
25 August 2010 at 12:18am
I posted a related question here:
3 February 2012 at 4:39am
I created a pull request for 2.4.x to add the ability to override the homepage URL segment. Hopefully it will get used to provide this functionality.
|Go to Top|