Hello world


Time to start our company blogging :D

How we could start without "Hello World" application. This time it will be little different ... it'll be base on Umbraco. Below you can find description and screens how to fast, in 10 easy steps, setup Umbraco to expose you content page to the world.

It's simple base configuration, but it's total process with setting up document type, template and macro. At the very end we create content node and publish page on website. Solution is base on Umbraco 6.0.3 and WebForms / Razor.

1. Click on icon section Settings. Next on node Document type create new document type – “Home”. On creation mark check box “Create template”. New document type and related template should be created – see picture below.

2. Next click on tab “Generic properties” and define to properties :
- Title – with alias : title, type : Textstring,
- Content – with alias : content, Type: Richtext editor.
Save changes.

3. Now click on node template and we will create base structure for our page – see picture below.

4. Now we will create our first Razor macro to display our page properties defined in document type. Click on icon section “Developer” and on node “Scripting files” choose “Create new”. Popup window should appear. Setup name and parameter for new macro like on screen below.

5. Now both new Razor script file and macro are created. Click on new created file and enter code from screen below. “@Model” is object that holds current page/document type settings and properties value.

6. Now go back to “Settings” section. We need to place our Maco in Template file. Click on Home template definition. From menu above, click on “ Insert macro” icon and select our macro.See screen below for details. Remember to always save changes.

7. Ok. We have base configuration of our Umbraco site. Now click on icon section Content, on node Content choose option “Create” with configuration presented on picture below. At the end on pop window click button “Create”.

8. Now enter “Hello World!” in our page definition. After you finish – “Publish” you changes by clicking from top menu icon “Save and Publish”. See below picture for details.

9. Now go to tab Properties and hit Link to document. See picture below.

10. You should see you Hello Word site in new window.

Congratulation you get familiar with Umbraco development. Stay tuned for more :)

    Umbitious.com 2021 all rights reserved.