Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

First Page instead of URLSegment = /home


Go to End


4 Posts   2235 Views

Avatar
stefant42

Community Member, 14 Posts

3 March 2010 at 12:11pm

Edited: 03/03/2010 12:11pm

Is it possible to teach Silverstripe to use the First Page of Sitetree instead of searching for the URLSegement "/" or "/home"..

Avatar
carlos

Community Member, 42 Posts

3 March 2010 at 2:32pm

Hi,

just checked, it will use the first page in the SiteTree as the home page, not matter the name of the page.
you'll need to check the version of SS you are using.

cheers

Avatar
stefant42

Community Member, 14 Posts

4 March 2010 at 2:13am

I'm still using SS 2.3.4 with the subsite module... Is it possible, that the subsite module make it happen?

Avatar
stefant42

Community Member, 14 Posts

12 July 2010 at 10:48pm

You can solve the Problem in

class RootURLController extends Controller {
	
	/**
	 * @var boolean $is_at_root
	 */
	protected static $is_at_root = false;
	
	/**
	 * @var string $default_homepage_urlsegment Defines which URLSegment value on a {@link SiteTree} object
	 * is regarded as the correct "homepage" if the requested URI doesn't contain
	 * an explicit segment. E.g. http://mysite.com should show http://mysite.com/home.
	 */
	protected static $default_homepage_urlsegment = 'home';

see protected static $default_homepage_urlsegment = 'home';