mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR #4973 Automatically generate URLSegment for default records on SiteTree and ErrorPage instead of explicitly setting them
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94352 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2c24e5c83b
commit
52abe83a2b
@ -63,7 +63,6 @@ class ErrorPage extends Page {
|
||||
$errorpage = new ErrorPage();
|
||||
$errorpage->ErrorCode = 404;
|
||||
$errorpage->Title = _t('ErrorPage.DEFAULTERRORPAGETITLE', 'Page not found');
|
||||
$errorpage->URLSegment = 'page-not-found';
|
||||
$errorpage->Content = _t('ErrorPage.DEFAULTERRORPAGECONTENT', '<p>Sorry, it seems you were trying to access a page that doesn\'t exist.</p><p>Please check the spelling of the URL you were trying to access and try again.</p>');
|
||||
$errorpage->Status = 'New page';
|
||||
$errorpage->write();
|
||||
|
@ -1201,7 +1201,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$aboutus = new Page();
|
||||
$aboutus->Title = _t('SiteTree.DEFAULTABOUTTITLE', 'About Us');
|
||||
$aboutus->Content = _t('SiteTree.DEFAULTABOUTCONTENT', '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>');
|
||||
$aboutus->URLSegment = "about-us";
|
||||
$aboutus->Status = "Published";
|
||||
$aboutus->write();
|
||||
$aboutus->publish("Stage", "Live");
|
||||
@ -1210,7 +1209,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$contactus = new Page();
|
||||
$contactus->Title = _t('SiteTree.DEFAULTCONTACTTITLE', 'Contact Us');
|
||||
$contactus->Content = _t('SiteTree.DEFAULTCONTACTCONTENT', '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>');
|
||||
$contactus->URLSegment = "contact-us";
|
||||
$contactus->Status = "Published";
|
||||
$contactus->write();
|
||||
$contactus->publish("Stage", "Live");
|
||||
|
Loading…
x
Reference in New Issue
Block a user