Thursday, July 21, 2011

Learning Umbraco in a week - Day II



This is my second post of the "Learning Umbraco in a week" series. The main agenda of this post is listed below.
  • Introduction to Umbraco Document Types
  • Creating Umbraco Document Type 
  • Setting up Umbraco Document Type
  • Introduction to Umbraco Content
  • How to create a Web Page or Content in Umbraco?
  • How to Templatize Umbraco? 
  • Introduction to Umbraco Data Types

Introduction to Umbraco Document Types
Before creating a web page in Umbraco, you must first create a Document Type. Then when you do create the web page, you will specify which Document Type it is based on. 

Document Types are the heart of the content structure of Umbraco and they define which properties the content elements have in detail and the data that a web page will use. It also defines the interface you will see when creating the web page. A Document Type specifies which kind of data, fields (web controls), and content can go on the web page. Document Type have nothing to do with web page presentation or layout - that is handled in Templates. Document Types can be accessed by following the steps below. 

Go to Umbraco Default Page (Admin Page) > Sections > Settings > Document Types.


Creating Umbraco Document Type
To create a Document Type in Umbraco follow the steps below.
  1. Go to Umbraco Default Page (Admin Page) > Sections > Settings.
  2. Right-click on the Document Types folder and enter any name.

Setting up Umbraco Document Type
To set up a Document Type in Umbraco, access the Document Type follow the steps below.

Go to Umbraco Default Page (Admin Page) > Sections > Settings



In the Main Panel (on the right in your browser) you will see the tabs where you define that type.
  • Info - Info tab primarily entails the display options for the Document Type, and which templates can be used.
  • Structure - The Structure tab is where you control the hierarchy of your site by creating child documents.
  • Generic Properties - The Generic Properties tab is where you specify what kind of content can go on web pages that are based on this Document Type. These Properties determine which fields and controls can appear on your web page.
  • Tabs - Tabs tab is where you specify the tabs that will show up when you create a web page based on this Document Type. After you create a tab, you can assign Properties to it in the Properties tab. 

Introduction to Umbraco Content
Content or Web Pages in Umbraco are based on Document Types, i.e. before you can create a Content or Web Page, you must have a Document Type for the type of page you want. The Content or Web Pages can be accessed by following the steps below.

Go to Umbraco Default Page (Admin Page) > Sections > Content.


How to create a Web Page or Content in Umbraco?
To create a Web Page or Content in Umbraco follow the steps below.
  1. If you do not yet have any Web Pages or Content, create one by right-clicking on Content and choosing Create.
  2. Enter a name for the Web Page and click Create. The page will show up under the Content folder (refresh your browser page if you need to).
  3. Click on your new Web Page. In the right panel, you will see the tabs that allow you to set the Content that will appear on the page.
  4. Enter the Content for the Web Page, by entering Content in the tabs in the main panel. If you want your Web Page to contain more types of Content than are allowed here, you must edit the Document Template which is used by the page. To see which Document Type the page uses, go to the Properties tab for the Web Page.
  5. When you’re done, click the "Save and Publish" button in the tool bar.
  6. To see how your Web Page looks in Umbraco, go to the Properties tab for that page, then click the "Link to Document" url at the bottom of the tab.

How to Templatize Umbraco?
Templates define the layout and presentation of a web page. Templates are where you define the design and layout, which CSS to use for the page, etc. By default, when you create a Document Type, a Template is also created for that Document Type, unless it is not desired. To access Umbraco Templates follow the steps below.

Go to Umbraco Default Page (Admin Page) > Sections > Settings > Templates.


Templates are actually ASP .NET Master Pages. Moreover, nesting of Templates is same is nesting Master Pages in ASP .NET, i.e. Templates can be based on other templates.


Introduction to Umbraco Data Types
A Data Type in Umbraco is an editor type associated to the Property. Data Types are not the same as those in computer programming.

A common Type used is "Rich Text Editor", selecting this type will display a rich text editing control to the user during content editing of this Property.
To access Umbraco Data Types follow the steps below.

Go to Umbraco Default Page (Admin Page) > Sections > Developer > Data Types.


That's all for this post, in the next post (Learning Umbraco in a week - Day III) we will go through XSLT & XPATH.

No comments:

Post a Comment