21309 Posts in 5738 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1374 Views |
-
Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

4 May 2010 at 10:57pm Last edited: 4 May 2010 11:17pm
Hello,
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?
Ty!
-
Re: Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

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
-
Re: Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

24 August 2010 at 12:44pm
I also need a solution for this. Has anyone created a working hack for this?
-
Re: Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

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.
-
Re: Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

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'. -
Re: Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

25 August 2010 at 12:18am
Thank you.
I posted a related question here:
http://www.silverstripe.org/general-questions/show/290923 -
Re: Rename 'Home' Page to 'Welcome' - dev/build creates new homepage :(

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.
| 1374 Views | ||
|
Page:
1
|
Go to Top |





