Hi,
I'm very new to SilverStripe. Currently I'm doing my first project with it. Every time when I run /dev/build/?flush=all, the default home page, named 'Home' is created. I have a second page with different name, which I want to be my 'home page' (the page that is shown by default). Is it possible to change the home page? If so, where?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi Mazu
SilverStripe looks for a page with the URL segment 'home' to use as the home page. To get your new page to be the home page simply delete the current homepage and then change the URLSegment of your custom page to 'home' under the 'metadata' tab.
Aram
Is there a way of preventing the 'Page not found' page from being automatically generated? Or at least hiding it at a specific user level?
Aram, don't you also have to move your new home page to the top of the sitetree? or does it just look for 'home' at any location?
Tim, is this the same client thats wants no functionality at all from their CMS? If so, at this point, I am wondering why you don't just give them HTML files and as copy of Dreamweaver ;).
I think that the ability to edit 'Page not found' and other error pages by content editors is quite important, as they may need to quickly change contact information or any other details that are present on the page.
If you absolutely have to disable this, you may be able to extend CMSMain and add an extra requirements::javascript() that hid error pages from the sitetree. Not sure how well (if at all) this would work though.
Mo
I changed the URL Segment of my custom page to 'home' under the 'metadata' tab, and it is now the home page that appears if there is nothing in the URL except the domain name (http://mysite.com), which is what I want.
In the Navigation menu, the link to the page I am using for my home page simply points to http://mysite.com. If I am at a page like http://mysite.com/about, clicking on that link to http://mysite.com does nothing.
How does one force Silverstripe to return to the home page via an unmodified URL like http://mysite.com?