{"id":666,"date":"2012-10-05T22:05:20","date_gmt":"2012-10-06T02:05:20","guid":{"rendered":"http:\/\/warriormill.com\/?p=666"},"modified":"2019-03-11T15:09:32","modified_gmt":"2019-03-11T19:09:32","slug":"introduction-to-sitecore-designing-your-first-data-template","status":"publish","type":"post","link":"https:\/\/warriormill.com\/2012\/10\/introduction-to-sitecore-designing-your-first-data-template\/","title":{"rendered":"Introduction to Sitecore: Designing your first data template"},"content":{"rendered":"

In this article, we will show you how to design your first Data template. A \u00a0Data template is a representation of the data you want to see on screen.<\/p>\n

First let’s start by logging into sitecore via Content Editor mode. Content Editor is where you will be spending most of your time developing websites.
\n\"\"<\/p>\n

After you login you should see the \u00a0following screen.
\n\"\"<\/p>\n

Navigate to the User Defined section under Templates. Lets create a Template folder \u00a0by clicking on the \u201cTemplate Folder\u201d icon. Give a name of \u201cDemoData\u201d.<\/p>\n

\"\"
\nNext we will create a Template and Give it name called \u201cSamplePage\u201d.<\/p>\n

\"\"<\/p>\n

\"\"
\nSelect the location to be the DemoData folder we previously created.
\nYou now you have base template that you can start adding fields to. You can group your fields by section, this is mostly for you to organize and group data it is not \u00a0how you retrieve your data. Lets create a section called header. Under it give it a field called Title and select SingleLine Text field from the options in the dropdown. Continue and add a field called MetaDescription and select MultiLine Text field from the options in the dropdown. Lets add another section called Content, in this section add a field called Body and select Rich Text field from the optin in the dropdown. You should have something that look like the screenshot below.<\/p>\n

\"\"<\/p>\n

Next we have to do one of the most important things, and the easiest step to forget. We have to add the standard values to the the template. Under the Builder tab select options.<\/p>\n

\"\"
\nClick on the standard values button. You should now see the following.<\/p>\n

\"\"<\/p>\n

The reason you have to add standard values is for a couple reasons. This is where you can add default values to your data template, when a user creates a new instance of it it will be pre populated with the default values that you added. Standard values is also where you configure assignments rules and security. With the standard values node selected click on the configure tab, and then assign.<\/p>\n

\"\"
\nThis assignment rule allows us to create SamplePages under sample pages, in essence you can create a hierachy of pages. Expand the content node and right click on the Home node, select Insert Sample Item and name it Page1.<\/p>\n

\"\"<\/p>\n

This page won’t be able to display since we have not assigned \u00a0layout to it. If you navigate to it you will get a 500 error saying there isn’t a layout assigned to it.<\/p>\n","protected":false},"excerpt":{"rendered":"

In this article, we will show you how to design your first Data template. A \u00a0Data template is a representation of the data you want to see on screen. First let’s start by logging into sitecore via Content Editor mode. Content Editor is where you will be spending most of your time developing websites. After […]<\/p>\n","protected":false},"author":1,"featured_media":668,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[],"_links":{"self":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/666"}],"collection":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":4,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"predecessor-version":[{"id":699,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/posts\/666\/revisions\/699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/media\/668"}],"wp:attachment":[{"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/warriormill.com\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}