Posts Tagged ‘umbraco’

Getting familiar with Umbraco

Hello Umbraco

Umbraco’s terms used may be unfamiliar to you like it does to me. The followings are some translations to help myself understand Umbraco perspective as a CMS.

In such a CMS, a web application is seen as a set of the contents (called documents) and the content UIs (called templates) which display the contents.

content is defined as a set of properties, which have values. To be close to programming, we can think of it as variables.

A web application is a set of many contents which can be arranged in a hierarchy manner – called the content tree of the website.

An UI is just an HTML file where variables lie in here and there. Sometimes, we need to have an expression of the variables rather than the sole variables – this is when the macro comes into play. The macro’s output is a bunch of HTML, plotted by variables together with XSLT expressions (the ones who search for and manipulate variables among the content tree).

That’s just it.

Details

To define a content, we use document. A document is of a particular document typewhich includes information about: 1) the variables ‘s definition which can be grouped into tabs, 2) the templates (the allowed/default ones) used to display the variables, 3) which child nodes are available to use when manipulating the content-tree.

There are two types of variables: user-defined variables and built-in variables. The built-in ones are prefixed by @.

A template can have a master template – this is a way Umbraco support making websites use a common master theme. Master & normal(non-master) templates are all HTML text except this difference: 1) a <asp:placeHolder id=”phID”> is defined in the master – it is where the non-master template ‘s HTML will be displayed. 2) a<asp:content contentPlaceHolderID=”phID”> is defined at the begining of the HTML script to indicate what master template it uses (i.e. the phID one).

When editing the template, sometimes you need an “HTML-function” that generates HTML script given the content XML tree. In Umbraco, we have such “functions” asmacrosMacros define HTML-fuction by using XSLT files.

As we know, an XSLT file takes input as an XML text and then manipulate the XML elelment (e.g. select the element nodes using XPath, looping through the nodes list, …) to convert it into HTML script. Here in Umbraco, whenever a macro is called inside a template T, the macro’s XSLT file is called along with its input set as the content XML tree. This XSLT file is also passed a parameter named currentPage which stored T-representing content node ‘s XPath. The script in XSLT file that starts using this passed parameter is the line: <xsl:param name=”currentPage”/>. Since then, we can access this xpath value by using $currentPage.

Getting started with Umbraco

Getting started with umbraco

Posted July 24, 2008

Last Saturday, during the umbraco meetup the ‘lack of documentation’ topic came up (as usual). So here is for all those people trying to get started….

A great way to get started is to install Warren’s creative web site wizard and to take a look at how things are set up and how it interconnects (developer section, right click macro’s, choose import package then open the repository and install the package). You can also find different references on the web, I tried to structure some of them in this ‘getting started’ list.

Download:

You can always find the latest release on codeplex (currently 3.0.5)
http://www.codeplex.com/umbraco/Release/ProjectReleases.aspx?ReleaseId=6344

Installation:
http://www.umbraco.org/v4 (link to screencast in the bottom right of the page)
http://umbraco.org/documentation/books/install-umbraco-21x-on-windows-xp
http://umbraco.org/documentation/books/install-umbraco-30-on-windows-server-2003
http://umbraco.org/documentation/books/install-umbraco-30-on-windows-vista
http://umbraco.org/documentation/books/install-umbraco-30-on-windows-xp

Basics:
Document Types:
http://www.umbraco.org/blog/2007/12/3/dec-3-umbraco-basics-document-types
http://www.umbraco.org/blog/2007/12/6/dec-6-document-types-part-ii
http://www.umbraco.org/documentation/books/document-types-explained

Templates:
http://www.umbraco.org/blog/2007/12/7/dec-7-templates-part-i—the-introduction
http://www.umbraco.org/blog/2007/12/12/dec-8-adding-page-information-to-templates
http://www.umbraco.org/blog/2007/12/13/dec-9-using-master-templates
http://www.umbraco.org/documentation/books/templates-explained

Xslt and Macro’s:
http://umbraco.org/documentation/books/xslt-basics
http://umbraco.org/documentation/books/extending-xslt-with-c-or-javascript
http://umbraco.org/documentation/books/macro-parameters-syntax

Beyond the Basics:
.Net controls and umbraco:
http://en.wikibooks.org/wiki/Umbraco/Samples_and_Articles/Dot_Net_Controls
http://www.nibble.be/?p=12

Actionhandler:
http://www.umbraco.org/documentation/books/creating-and-using-an-action-handler

Base:
http://www.umbraco.org/documentation/books/introduction-to-base

Xslt extension:
http://en.wikibooks.org/wiki/Umbraco/Create_xslt_exstension_like_umbraco.Library_in_C

Custom datatypes:
http://www.nibble.be/?p=24

Flash and umbraco:
http://www.nibble.be/?p=28

Still having trouble to get started ? The umbraco community is great, so sign up to the umbraco forum and post your questions.