{"id":280,"date":"2008-10-23T14:46:24","date_gmt":"2008-10-23T18:46:24","guid":{"rendered":"http:\/\/www.eyoungwon.com\/journal\/?p=280"},"modified":"2008-10-23T14:47:07","modified_gmt":"2008-10-23T18:47:07","slug":"silverstripe-creating-a-new-page-type","status":"publish","type":"post","link":"https:\/\/eyoungwon.com\/journal\/silverstripe-creating-a-new-page-type\/","title":{"rendered":"SilverStripe &#8211; Creating a new page type"},"content":{"rendered":"<h2><a id=\"creating_a_new_page_type\" name=\"creating_a_new_page_type\">Creating a new page type<\/a><\/h2>\n<div class=\"level2\">\n<p>Earlier we stated that every page in a SilverStripe site has a <strong>page type<\/strong>, and that SilverStripe will look for a template corresponding to the page type. Therefore, the first step to get the homepage using a different template is to create a new page type.<\/p>\n<p>Each page type is represented by two php classes: a data object and a controller. Don\u2019t worry about the details of page types right now, we will go into much more detail in tutorial two.<\/p>\n<p>Create a new file <em>HomePage.php<\/em> in <em>tutorial\/code<\/em>. Copy the following code into it:<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Creating a new page type Earlier we stated that every page in a SilverStripe site has a page type, and that SilverStripe will look for a template corresponding to the page type. Therefore, the first step to get the homepage using a different template is to create a new page type. Each page type is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,76,2],"tags":[84,85,86,61],"class_list":["post-280","post","type-post","status-publish","format-standard","hentry","category-cms","category-silverstripe-web-development","category-web-development","tag-creating-new-page","tag-new-page-type","tag-page-type","tag-silverstripe"],"_links":{"self":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts\/280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/comments?post=280"}],"version-history":[{"count":2,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts\/280\/revisions"}],"predecessor-version":[{"id":282,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/posts\/280\/revisions\/282"}],"wp:attachment":[{"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/media?parent=280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/categories?post=280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eyoungwon.com\/journal\/wp-json\/wp\/v2\/tags?post=280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}