Document Type Part II

Document Type Creation Walk Through

Step 1 - Open the umbraco administration application.

Step 2 - Click on the Settings section icon in the lower left corner of the screen.

Step 3 - Right-Click on the Document Types node in the Settings tree.

Step 4 - Click the Create menu option.

Step 5 - Type the name of the Document Type you are creating and check the "Create matching template" checkbox.

Note: The majority of the time you will want a template associated with the Document Type. Future versions of umbraco may have the checkbox checked by default, but as for now make sure it is checked. In this walk through we will create a Text Page which is a simple type that just has a single property "Content". This type will allow the content editors to create basic pages.

Step 6 - Create a Tab be first selecting the Text Page document type in the settings tree and selecting the "Tab" tab. Type "Content" into the New Tab text box and then click the New Tab button. This will add the tab to the tabs list displayed below the text box.

Step 7 - Click the save icon.

Note: VERY IMPORTANT! The administration application is a web page, this means you will not be warned if you change pages by selecting a different section and you HAVE NOT SAVED your current work. You should get in the habit of clicking the save icon every time you make changes. This applies to every part of the administration application.

Step 8 - Click on the "Generic properties" tab and click the "Click here to add a new property" bar under the "Add New Property Heading.

Step 9 - In the Edit "Creation new property" fields enter the following information: In Name enter "Content", in Alias enter "bodyText", in Type select "Richtext editor", and in Tab select "Content".

You may be wondering why bodyText is used. There is no requirement that says you must use this alias however, bodyText is generally used in umbraco and by using it we save ourselves work in other areas because we don't have to keep changing the value to whatever we used instead.

Step 10 - Click the save icon.

Step 11 - Click on the "Structure" tab and put a check in the Text Page check box.

Step 12 - Click the save icon.

Step 13 - Click on the "Info" tab and select the doc.gif item from the icon list, select the doc.png item from the thumbnail list, add a description and ensure that "Text Page" is checked in the Allowed Templates and that it is also selected in the Default Template list.

Step 14 - Click the save icon.

Summary

If you have followed the steps above, you have successfully created a Document Type. You are now only 1/2 way done. You can now create pages in the content section however when you view them you will see nothing. The reason is you have only created the data structures, you have not created any view. In order to create views for your site You will need to create Templates. Templates are a topic for another book. However, this walk through is not very useful if you can't see your data so we will do one minor extra step to enable at least a basic view of your content.

Bonus Step - Select the Text Page template under the Templates node in the Settings tree. The metadata for the template will show up in the right pane of the screen. In the Template field type in the following value and click the save icon:


You can now go to the content section and create new pages for your site by right clicking on the Content node and selecting "Create". If you were able to follow this walk through you should have no problems creating content as it works in the same manor.

Don't be afraid to experiment and have fun!

0 comments:

:a: :b: :c: :d: :e: :f: :g: :h: :i: :j: :k: :l: :m: :n:

Post a Comment