Best Blog Software - What Are the Best Choices?

When trying to find the right if not the best blog software there are tons of options available.

Your choice will largely depend on how much money you have to invest in it and also the kind of options that you are looking at in a weblog application.

Some of the common free blogging applications are Wordpress and Blogger. Blogger is incredibly easy to use and you can have a new blog up in minutes right on their server. However, one of the limitations of Blogger is that you can't use plugins that are specially designed for Wordpress blogs.

Other popular choices include Drupo, Typo, Squarespace, Kiubi, Movable Type and Umbraco.

How To Know When You Should Buy Your Blogging Software

It's important to consider your blogging needs first of all. If you are serious about blogging and making money as a blogger then you really need a software application that will automate a lot of the tedious tasks and free up a lot of your valuable time to do other things.

You also need to consider your skill level. Some programs are more complicated than others. Other software programs such as Blogger are simple to use and provide step by step instructions.

Price is another factor.

Features are also of critical importance. If you only have basic needs and aren't serious about blogging then Blogger or Wordpress should be enough to get you started.

However, if you blogging to create a passive monthly income from it then the right program is a must have - not a choice. I'm a niche blogger myself and my program of choice is cutting edge. It's called Firepow. It's perfect for both novices and advanced bloggers. It's easy to use, you can create a blog in a matter of minutes, and monitor and manage multiple blogs from the one control panel. You can see an example of a Firepow created blog here.

I make $8000,00 online as a niche blogger. Let me give YOU the edge over other Firepow users with my exclusive Firepow offer. Instantly save 30% on Firepow and get access to my exclusive Firepow bonuses to help you make money online. PLUS when you invest in Firepow at the site below you'll also qualify for free one on one email coaching and mentoring with me.

Install umbraco on Windows Server 2003

Installing umbraco on Windows Server 2003 is very simple and quick.

Beginning with umbraco v3.0.3, you can use the automated MSI installer. These instructions, however, demonstrate in detail every step that is required for a manual installation of umbraco.

Prerequisites
These instructions assume you have already installed and configured the following items on your server(s).

•Windows Server 2003
•IIS
•Microsoft .NET Framework 2.0
•Microsoft ASP.NET 2.0 AJAX Extensions 1.0
•Microsoft SQL Server 2005
Note: Be sure that the TCP/IP protocol is enabled via the SQL Server Configuration Manager


INSTALL SQL Server Management Studio
1.Click Start, click All Programs, click Microsoft SQL Server 2005, and click SQL Server Management Studio.
2.Connect to the database server with an account that has sufficient permissions to create a new database. Contact your database system administrator if you are unsure how to log in.

3.Click Connect.
4.Right-click on the Databases folder, and select New Database.

5.Enter a Database name.
(we’ll use ‘umbracoCMS’ in these instructions)
6.Leave the Owner as .

7.Click OK.
8.Expand the Security folder.
9.Right-click on the Logins folder, and select New Login.

10.Select the General page:
1.Enter a Login name. (we’ll use ‘umbracoUser’ in these instructions)
2.Select the radio button next to “SQL Server authentication”, and enter and confirm a Password.
3.Remove the check mark in the box next to “Enforce password policy”.
(note: this is optional and should not be done in a production environment)

11.Select the User Mapping page:
1.Place a check mark in the box next to the Database you created.
(‘umbracoCMS’ in these instructions)
2.Place a check mark in the boxes next to the following Database role memberships:
db_datareader
db_datawriter
db_owner
public

3.Click OK.
12.Right-click on the root server folder (the parent of Databases, Security, etc.), and select Properties.

13.Select the Security page:
1.Select the radio button next to “SQL Server and Windows Authentication mode”.

2.Click OK.
Test the configuration by disconnecting and logging in as the user you just created.
1.Click File, click Disconnect Object Explorer.
2.Click File, click Connect Object Explorer.
3.Select SQL Server Authentication, enter the name of the login user you create (‘umbracoUser’ in these instructions), and type the password you specified when you created the login user, above..

4.Click Options.
5.Select the Connections Properties tab.
6.Select TCP/IP as the Network Protocol.

7.Click Connect.
If you cannot log in with SQL Server authentication…
•Check the log files after a failed attempt.
•The default log location is C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG and can be opened with Notepad.
•Look for an entry in the ERRORLOG such as: 2007-05-16 16:43:42.75 Logon Error: 18456, Severity: 14, State: 8.
•“State: 8” indicates a problem with the user password.
•You can find a list of the meaning of each state message at
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx

Install umbraco 3.0 Files
These instructions were created using umbraco 3.0.3.

IIS on Windows Server can host a large number of web sites. If you already have web site content in C:\Inetpub\wwwroot (the Default Web Site), create a new web site and corresponding root folder with the IIS Manager and extract the files and folders into that new location (such as, C:\Inetpub\umbracoRoot). These instructions will use the default web site.

Note that umbraco 3.x does not support being installed in virtual directories.

1.Download the binaries for umbraco 3.0 from the umbraco web site at:
http://www.codeplex.com/umbraco/Release/ProjectReleases.aspx?ReleaseId=6344
2.Save the v303.zip file to your desktop.
3.When downloading has finished, double-click the v303.zip file on your desktop.
4.Click Extract all files.

5.Follow the wizard to extract all files and folders to C:\Inetpub\wwwroot
Note: it is vital that you keep the file and folder structure intact!
Set file permissions

You will need to set file permissions to allow umbraco to create and update its files.

1.Using My Computer or the Windows Explorer, navigate to the folder containing the umbraco web site files.
Note: C:\Inetpub\wwwroot, according to these instructions.
2.Hold down the CTRL key, and click the following folders to select them:
bin
config
css
data
media
python
scripts
umbraco
usercontrols
xslt

1.Right-click on any of the selected folders, click Properties.

2.On the Security tab, click Add.

3.Click Locations.

4.Select the local machine (or domain controller if it is the local machine)

5.Type NETWORK SERVICE into the “Enter the object names to select” text box.
(Note: NETWORK SERVICE is the default owner of the web site’s application pool in IIS. If you have changed the application pool to another user, enter that username here)

6.Click Check Names.
Note: the text field should change to NETWORK SERVICE, and underline the name, indicating the account has been found and validated.

7.Click OK.
8.On the Security tab, click the NETWORK SERVICE user name.
9.Place a check mark in the box next to Full Control, in the Allow column.

10.Click OK.
3.Click the web.config file and repeat the steps above

Configure IIS for umbraco
1.Click Start, click Administrative Tools, and click Internet Information Services (IIS) Manager.
2.Expand the (local computer) folder, expand the Web Sites folder, and click on Default Web Site.
Note: if you extracted the umbraco files to a folder other than C:\Inetpub\wwwroot, select the website that corresponds to that file location.
3.Right-click on Default Web Site, click on Properties.

4.On the ASP.NET tab, select ASP.NET version of 2.0.xxxxx.

5.You may also need to add default.aspx as the top-most entry on the Documents tab if it is not already present.

6.Click OK.


Configure IIS for umbraco
1.Click Start, click Administrative Tools, and click Internet Information Services (IIS) Manager.
2.Expand the (local computer) folder, expand the Web Sites folder, and click on Default Web Site.
Note: if you extracted the umbraco files to a folder other than C:\Inetpub\wwwroot, select the website that corresponds to that file location.
3.Right-click on Default Web Site, click on Properties.

4.On the ASP.NET tab, select ASP.NET version of 2.0.xxxxx.

5.You may also need to add default.aspx as the top-most entry on the Documents tab if it is not already present.

6.Click OK.

Configure umbraco 3.0
You will need to edit the web.config file to specify the location and connection string information for your database.

1.Using My Computer or the Windows Explorer, navigate to the folder containing the umbraco web site files.
Note: C:\Inetpub\wwwroot, according to these instructions.
2.Double-click the Web.config file.

3.If prompted, select the radio button next to “Select a program from a list of installed programs”, click OK, click Notepad, place a check mark in the box next to “Always use the selected program to open this kind of file”, and click OK.
4.Near the middle of the file, find the following line:


5.Modify the following umbracoDbDSN items to match your database configuration.
Note: according to these instructions, the values would be:
1.Server=127.0.0.1
Database=umbracoCMS
User ID=umbracoUser
Password=denmark
Trusted_Connection=False

6.Save the Web.config file.

Set up umbraco from a web browser
1.Using a web browser, navigate to http://localhost.

2.Click Next.

3.Your database should be found and identified as None, meaning your database is empty.
Note: If your database is not found or is unavailable, double-check your umbracoDbDSN settings in the web.config file.
4.Click Install.

5.Click Next.
6.Click Next.
Note: If there are any permission problems, return to Set File Permissions, above.
7.Enter a password for the umbraco user interface, and click Change Password.
8.Click Next.
9.Click Next.

10.Finally, delete or rename the \install folder
Note: C:\Inetpub\wwwroot\install, according to these instructions.

Congratulations!
You are now ready to start creating an umbraco website!

Please note that if you now browse to http://localhost, you will see the following page because the umbraco web site does not yet have any content.



Log in to the umbraco interface
1.Navigate to http://localhost/umbraco, or click the Launch umbraco button shown above.

2.The username is admin.
3.The password is that which you entered when you set up umbraco from your web browser, above.
4.Once you have logged in, you will see the full umbraco interface.

Installing a Website Starter Kit (optional)
1.Click the Developer section icon, and then right-click on Macros to select the Import Package item.

2.Click the Go to the package repository link

3.Select the Website Packages section to view a list of sample websites.

Converting existing site to Umbraco - Installing umbraco on our server

Installation was pretty good, because our server is a Windows Server 2003, which means that umbraco is provided with an auto-installer. Of course, I had to install Microsoft SQL Server Express. Fortunately, it was so simple.

To install I used this item:http://umbracocms.blogspot.com/2009/12/install-umbraco-on-windows-server-2003.html

1. The installation of MS SQL Server Express

2. Install umbraco

3. Remember to configure your domain name or a subdomain with your ISP and IIS

A small problem is that when he says the foundation, my default SQL Server Express named something like MSSQL $ L12325413 essentially the default name of my machine, the installation program has been allocated SQL. It was not easy to understand, and there was no help from umbraco to find the name of the database. What I had to get umbraco installation was "L12325413/L12325413" hostname / server name ...

Once this is resolved, the installation went smoothly.

TIP: To find the name of the database, run the SQL Server Surface Area Configuration (catchy name), select the Surface Area Configuration for Services and Connections, and find the service name.

It gives you umbraco empty, alone, naked and lost ...

So, what's more, I installed the package WebsiteWizard. It provides a good overview of basic functionality. The repository of the package can be found here:

http://packages.umbraco.org/packages

Converting existing site to Umbraco - Intro

T0 convert our existing web site to umbraco. This site is not terribly complicated, you can see here: , but it has its own quirks "small" are ordered.

I'll document the process here, hoping to learn a bit 'and perhaps help others get started. I am not an expert umbraco, just trying to collect document what I found so that others can learn from my researches.

Here are the steps you must take for my site translated, at least the steps I can foresee at this point ... The sections that follow are not necessarily in that order :-)
  • Installing umbraco on our server
  • Joined our provider of group membership as a witness. NET, as we have thousands of people registering on our site, and I'm not in the business of maintaining synchronized databases.
  • Moving CSS, scripts, and a framework MasterPages nested ASP.NET
  • See if I can get our current URL redirection to work with umbraco
  • Learn to manage my pages (HTTPS now automatically forwarded to the folder level)
  • Figure of URL parameters can be manipulated to my pages are dynamically generated.
  • Convert our current one basket. NET User Control.
  • Enabling Secure Web Services WSE3

Quick Take Review: Umbraco Web Content Management System III

Workflow

Workflow is an interesting topic for Hartvig. He quotes James Robertson and Tony Byrne saying "workflow doesn't work in practice". That being said, you can implement workflow.

Out of the box, Umbraco includes the basics including the ability to restrict users and get notified on actions. Workflow is based on the permission modelyou set up in the Users section. For example, if you don't allow Writers to have Publish permissions, then the Writer only has the ability to Save or Save and Send for Approval:

Workflow1.jpg
Umbraco — Simple Workflow Options

Note that the article has a little orange star, indicating it has not been published. As well, the right click menu does not offer the option to Publish, but to Send To Publish, which means sending for approval. There is also a button in the main window that you can click to send the article off for approval as well.

Notifications

The system does not automatically send out workflow notifications. One must subscribe to specific system events in order for this to happen. You can do this on a Site level, Section Level or Page level. You can also select which types of changes you want notification on (see list below).

Notifications2.jpg
Umbraco — Configuring Event Notifications

Notifications come by email:

Notifications.jpg
Umbraco — Email Notification Example

This is a fairly straightforward and basic approach to providing workflow for your content. In addition, the event model is exposed which is meant to enable third-party integrations (e.g., workflow systems, translation automation, etc.). In speaking with Niels, he generally discourages the use of workflow unless it is absolutely needed. With that said, there are cases where it is absolutely needed.

Multi-Lingual Support

Umbraco ships with 15 languages for a localized back office user interface (UI). You can also add additional language if required.

The Umbraco UI text is stored in an XML file. This enables you to take a copy of the file and translate it for a new language. Once done, the language is automatically available.

Current languages include: English, French, Spanish (with variants), Dutch, Japanese, Chinese, Russian, Danish, Swedish, Norwegian and Greek.

There is a menu item on the Content Menu to Send to Translation. You must have a user assigned to the Translator role for this to work. This will send an email to the Translator.

Content_SendtoTranslation.jpg
Umbraco —
Send Content for Translation

Editorial Capabilities

Umbraco refers to their Administration site as the Back Office. In the Back Office you can do a number of things, depending on your role and permissions: Manage Content, Media, Users and Members.

You can also manage Settings like style sheets, templates, scripts, dictionary, languages, media types and document types. Finally, there's a developers section where you can do things like browse cache settings, manage data types, create and manage macros, packages, XSLT files and phyton files.

When you first log in, the opening dashboard is empty, but you are able to modify what is displayed in the dashboard through the use of dashboard controls.

These dashboard controls are basically .NET user controls that are added to the /config/dashboard.config file. There are a number of free community controls for things like New Content, Last Modified Content, Search, Viewing Log Files, etc.

You can even create tabs to organize your dashboard better.

Umb_BackOffice.jpg

Umbraco Back Office — Main Dashboard

Content Section

The content section is where your editors are going to live. Other than possibly the media section, it's the only section they will likely have access to. It's here that they can manage the website pages and content.

The tree structure in the left pane represents the structure of the website — the navigation. To create a new page you can simply right-click on the navigation item where you want the new page to live (i.e click on Home to have it live under Home) and then fill in the sections in the main window.

Note that depending on how you set up the Document Type the new webpage is based on, there may be multiple tabs to complete. You can save your new webpage, Save and Publish or Preview it.

UmbCont_CreatePage.jpg
Umbraco — Creating Content in the
Back Office

When you create a new piece of content you can publish immediately or set a date sometime in the future. You can also set an archive date (Remove On).

In addition, you can change the default template that the content will be rendered in. Remember that you can only select a template that has beendefined as allowed for that Document Type. These properties are automatic with every piece of content created.

Other options that can be added include hiding the page in navigation, setting up an Umbraco alias and set up redirects to another page. Again, these many of these are properties you have to set up.

The right-click menu in the Content Section gives you a number of options:

Umbraco_RightClickMenu.jpg
Umbraco Back Office — Content Right Click Menu

One option is to Edit in Canvas. This options enables you to view the website and edit in context:

EditInCanvas.jpg
Umbraco — Editing in Canvas Mode (In-context Editing)

External Blog Editor Integration

If you prefer to develop your content using an external editor, you can do that with Umbraco. Out of the box, Umbraco supports both Word 2007 and Windows Live Writer, but you can also use just about any blog editor that works with the MetaWeblog API.

There is a small catch to this capability and that is that you can only grant access to a specific section of your website using the Content Channels functionality.

ContentChannel.jpg
Umbraco — Setting Up a Content Channel

Content Channels are set up for Users. You can only have one content channel per user.

The start node indicates at what location this users articles will be published to. The description field is usually the bodytext part of the Document Type you are creating. This is the main part of the content and usually is associated with a rich text editor control.

It is this channel that you connect your blog editor or Word 2007 to. You can view current content in the section and add new content. Of course you don't have the ability to add the other properties that may be associated with the Document Type, like Metadata. For anything other than Description, you need to come into the Back Office and edit there.

Media Section

The Media Section is where all your digital assets are stored. You organize this section any way you like. The types of media you can create are predefined in the Media Types under the Settings Section.

MediaSection.jpg
Umbraco — Media Library

Usually you would give your writer access to the Media Library in addition to the Content Section.

When you want to add images or other things to a content page, you first can select from the Media Library. You also have the option of adding something new to the Library.

AddingMedia.jpg
Umbraco — Using Media Library

Social Media Capabilities

There is a blog package for Umbraco that includes all the typical blogging capabilities:



  • Posts with paging and filter on category

  • Comments (custom usercontrol)

  • Datefolder Categories (using tag datatype)

  • Archive (collapsable, only showing latest months)

  • Latest comments

  • Blogroll (using related links)

  • Gravatar (global avatars)

Customizability & Integration

Umbraco is completely customizable to your needs and integration is something it does very well. You can extend it without modifying the source code. You can add new applications, new trees and new dashboards (shown in the right side of the back office website), new data sources and more. And you aren't limited to .NET systems.

There's a complete .NET API for manipulating Umbraco objects and a SOAP API.

Umbraco_API.jpg
Umbraco API

In addition to integrating with Umbraco, you can also expose Umbraco data to other systems, such as a SharePoint WebPart displaying Umbraco content.

You can extend Umbraco by adding Macros that include .NET User Controls or .NET Custom Control.

Packages

Packages are bundled applications that add additional functionality to the CMS or your website. In the Developer's Section of Umbraco, you can upload new Packages. Umbraco offers a number of free packages including applications for collaboration, site utilities and more.

Packages.jpg
Umbraco Packages

You can create your own package and view currently installed packages (you also remove installed packages from this section).

Creating your own Package enabled you to package up your site and related content and move it somewhere else, such as a Production environment

Content Delivery Architecture

Umbraco supports caching by default. Caching is configurable, but you do not have access to 100% of the settings. All published content nodes are loaded in the Umbraco.config file and then into memory for faster access. Static files are cached by IIS and templates, xslt and user controls are cached using ASP.NET cache controls.

Umbraco has built in load-balancing support. It can scale from a web hosting solution to a web farm out of the box. DNS Round Robin and Hardware solutions are both supported in Umbraco as is using a High Availability Service. There is a ten minute video on Umbraco.tv that walks you through the process of setting up Umbraco for load balancing.

Umbraco can support up to 200,000 published pages (2 million published properties). It has been tested to scale to 830 page requests/second or 35 million Umbraco page views a month. (Wired.co.uk did extensive testing when they decided to go with Umbraco.)

Similar Products

Hartvig says Umbraco has been used in the same market as solutions like Ektron,Sitecore, and occasionally SharePoint (when used incorrectly). Sitecore and Ektron are suited for mid to larger enterprises.

Other web content management systems to consider in the SMB space includeKentico and Sitefinity. Both of these systems are .NET based and developer oriented.

Summary

Here's a summary table of the review (rating is 0.0-5.0 with 5.0 being the best):

FeatureDescriptionRating
Product Core TechnologyASP.NET, IIS, Windows, AJAX5.0
Content EntitiesDocument Types4
Editorial FeaturesDashboard, Notifications, Canvas Editing, RTE4
Content VersioningUnlimited versions, review and rollback4
Content WorkflowBasic Workflow based on permissions and notifications3.5
Multi-lingual SupportSupports multiple languages out of the box4.5
Social Media CapabilitiesBlogging Package3.5
Security
Basic, Single Role, Manage granular permissions3.5
Content Delivery ArchitectureBuilt in Load balancing, EC2, hosted or web farm4

Umbraco in some ways stands alone because of how it's been designed. It is not a plug and play solution and this is what many web content management systems strive for today. It's not enterprise level, although it may be used for very large websites.

The biggest drawbacks to Umbraco from an enterprise content management standpoint are with it's workflow and users. The workflow is very simple, and although you can hook in 3rd party workflow solutions, it would be nicer to see more flexibility out of the box.

In addition, a user can only have one User Type — or Role — assigned to them. In many cases a user may fulfill multiple roles for different content. It may be possible to extend Umbraco to allow multiple roles, but this capability should be out of the box as well.

Documentation, Documentation, Documentation

Simply stated, the Umbraco documentation is lacking in structure and focus.

There is a lot of documentation on the website, but some of it is for version three and not version 4 and it's hard to know what you are supposed to be looking at. There's no defined reading path for learning how to use Umbraco…unless of course you subscribe to Umbraco.tv.

Download and install this web content management system and you may take one look at what's there and get concerned. Umbraco.tv will take that concernaway and is well worth the 19 EUR per month they are asking for.

That being said, there also needs to be some free documentation that helps you out as well — in a well structured format.

The good news is that Umbraco will have a book out at the end of 2009/beginning of 2010, so developers and designers and probably end-users will
have a much better idea of how this Web CMS really works.

Hartvig says that many of his community members say Umbraco is the best kept secret in web content management. This may likely to be true. You really don't get a good feel for the full capabilities that this solution has from looking at it. In some ways, we feel like we have just scratched the surface of what this Web CMS is all about.

Built for Designers and Developers

If you are looking for a web content management system that, once installed, your marketing team or non-technical users can use immediately, Umbraco is not
for you.

Umbraco is really designed to be used by a developer or development team. They have a lot of work to do before the writers and editors of the website even get started. That's not a bad thing, just something to keep in mind as you consider this CMS.

Again, we feel we must mention the steep learning curve. This, we believe, is primarily related to understanding how the Document Types work. If you get that under your belt, then you are a long way along and can likely have a website up and running pretty quickly.

The Content Section where you create your content is very easy to work in — a big plus for the non-technical users — and if you have defined your content types properly, will be a breeze to use.

Our Final Take

Overall, we like the CMS that Niels has built. This is partly because there is a developer in us and partly because you can create your HTML design in any tool you want, and cut and paste it into Umbraco to get your website up quickly.

Another nice aspect is that if you're already a .NET developer, you don't have to learn new technologies or templating languages. As such a developer, you should be well versed in creating the .NET controls which, along with XSLT, are key to developing an Umbraco solution.

If you are a .NET-focused operation looking for a web content management system to create dynamic websites for your customers, we recommend taking a close look at Umbraco.

Quick Take Review: Umbraco Web Content Management System II

Key Features and Ratings

Core Technologies

Umbraco is a Microsoft.NET solution. It runs on Microsoft Windows Server 2003 and up against SQL Server 2005 or VistaDB.

Built on the .NET framework 2.0 and using ASP.NET 2.0 and C#, Umbraco supports .NET Custom Control and .NET User Controls without having to do anything special. Controls are added to Umbraco using Macros. It fully supports ASP.NET Ajax using jQuery, Prototype, MooTools or another Ajax toolkit.

It also fully supports ASP.NET Master Pages. XSLT is used for generating dynamic lists.

You have full access to the Umbraco API which includes over 15,000 lines of code. The API is well documented. The event model for the content engine is also exposed allowing you to automate tasks based on the actions of content editors.

Designing Templates/Look and Feel

Umbraco does not have a custom template engine, so you do not have learn a new templating language in order to create websites. This is a plus in our opinion. The Umbraco team believes there are better tools already out there, tools that designers know well and are comfortable using.

UmbracoTemplate1.jpg
Umbraco Templates

For Umbraco, it's as easy as designing your website in your favorite tool like Adobe Dreamweaver, then cut and paste the HTML code into the Umbraco template editor (in the Back Office) and then in the spots where you want your Umbraco data, insert an Umbraco field and save. When a page is rendered using the template, the content is dynamically displayed.


UmbTemp_PageField.jpg
Umbraco Templates — Insert Page Field

Umbraco gives you 100% control over the design for your website. You don't need to worry about themes or skinning, the design can be anything you want. Hartvig believes that themes and skinning is often a sign of bad separation of content, functionality and presentation.

Modify vs Customize

Like any open source content management solution, you are able to modify the source. But like the Umbraco folks say, that's a big step to take and you run the risks of breaking future upgrades or breaking compatibility. Their motto instead is customize and extend, saying they have built every part of Umbraco to be extensible.

What About MVC?

Umbraco is heavily investigating the use of ASP.NET MVC — Microsoft's newest framework for ASP.NET — as an alternative for the front-end website. Hartvig says that the current engine is very close to the MVC model now.

Web Analytics

Umbraco does not have web analytics built-in. Hartvig believes analytics is not a trivial task and is best left to the experts. You can integrate any web analytics tool with Umbraco via web server plugins, access logs or JavaScript — think WebTrends and Google Analytics.

Content Entities

In Umbraco, the core or foundational concept is the Document Type.

Document Types describe the type of content that you can create in your website. Examples of Document Types include News Items, Articles, HomePage, SearchPage. Document Types are to Umbraco what content types are to another web cms and web pages are to another.

Document Types and IA

Understanding how Document Types work is the key to understanding Umbraco. Unfortunately, at first they are a bit confusing, because defining them is a mostly about modeling content but also a bit about the website's information architecture.

This blend of concepts and the related implications threw us for a little turn. However, if you can get these concepts under your belt, then the rest of the system is much easier to understand.

When you create Document Types you are also outlining the rough structure for the website's information architecture. Specifically, when you define a type, you must also specify where that type can live in the website's structure. Down the road, content authors and manager will not be able to over-ride this.

To put this differently, when you define the type you aren't exactly building the navigation, but you are placing limits on how the navigation can be defined.

In Umbraco, there's no delineation between content (like individual articles) and webpages (like HomePage or Article List page). You create Document Types for each type of content whether it's "real" content or a webpage with dynamic functionality and some metadata, etc. Hartvig says that this is a good thing and provides the flexibility needed when building a website.

In thinking about the blend of type definition and type usage it strikes us as a good model for small to mid-sized organizations with only one or a few authors and no "Editor" or "Administrator" to who controls the overall structure of the website. The initial system set up can be done by an expert and then the content managers can be left to their own devices and one need not fret that content instances will end up in the wrong place in the website.

For larger organizations it can also work, but if more powerful users want full control over the website's information hierarchies, they might find the blend of type and location to be a source of frustration.

Creating Document Types

Document Types are like SQL database tables. You create the Type and then assign a number of properties to it, indicating what the format of each property can be (text, rich text, drop down, etc) and if that property is required. This is pretty standard stuff for content management systems.

For example, an Article Document Type means that you can create one or more articles for your website.

CreateDocType.jpg
Umbraco — Creating a New Document Type

When you create a Document Type, you provide some basic information about it such as Name, Alias, Icon, thumbnail and description. The Icon is the image you see beside the content you create in the Content Section. The thumbnail gives you a quick view of what type of content you are creating when you create a new piece of content.

You can also indicate to have a template created automatically. All this does is create a template shell with the same name as the document type. You can actually have more than one template (view of the Document Type), but one is the default. The allowed templates section on the Info tab indicates which templates you can use for this Document Type.

Document Type Tabs

Sometimes you may have a lot of different properties for your content type. You can organize the way the content information is added by creating TABS for your document type. This is simply a way to organize the information you want to add without having everything listed on one single page. For example, you can have a tab for Core Content and one for MetaData.

Creating Properties

You define the properties for your Document Type in the Generic Properties tab and assign a TAB those properties will appear on.

DTProperties.jpg
Umbraco — Document Type Properties

Defining Structure

The Structure Tab for a Document Type lists the Document Types already created. Here you select the type of Document Types that can be created as child nodes under your Document Type.

The structure is really the navigation for your site. If you create a HomePage Document Type, then you would probably allow all other DocumentTypes to be created under it. But if you were creating a News Summary Page Document Type, you would probably only want a News Item Document Type to be createdunder it.

Security

Umbraco's security model is easy to understand. There are two parts to it. First, you can easily create users and roles in Umbraco.

Creating Users

When you create a user, you set up all the basics such as username, password, email, default language and role. In Umbraco, a user is assigned to one role only. You select what sections within the Back Office the user has access to and you can automatically redirect the user to Canvas Editing on log in, thus restricting them from the Back Office completely.

Umb_CreateUser.jpg
Umbraco — Creating a User

You can also restrict the area of content the user can work in by setting the Start Node in Content. If you set this node to something other than the top level, when the user logs in they only see the Content Navigation Tree from that Node down.

UserPermissions.jpg
Umbraco — Restricting Content Access

Creating User Types

There are several User Types created by default in Umbraco: Writer, Editor, Translator, Reviewer. For each role, you specify the permissions for that role.

CreateRole.jpg
Umbraco — Creating a User Type

When a user is assigned to a specific User Type, their actions are limited to those set by the User Type:

PermissionsMenuChange.jpg
Umbraco — Limiting Permissions by User Type

User Permissions

You can also set user permissions on individual pages.

SpecificUserPermissions.jpg
Umbraco — Defining User Permissions

Membership

You also have the ability in Umbraco to create Members Only areas for your website. In the Members Section of the Back Office you can create Member Types like Basic, Silver and Gold, Member Groups and view the Members who are signed up.

You can full control here over how to format Membership.

To assign a section of your website as Members only, you right click on the particular section and select the Public Access Menu Item. You actually have two options here. The first is to assign a generic username and password to the selected content. The second to assign a Group or Groups.

RoleBasedProtection.jpg
Umbraco —
Role Based Access Control


Content Versioning

Versioning of content entities is a core function of Umbraco. Every time you publish your content entity a new version is created and an audit trail is maintained. You can rollback to any version you want. There is no limit on the number of versions you have.

Umbraco_Versions.jpg
Umbraco — Content Versions with Visual Differences

When viewing a version of the content, you can view the difference between the current version and an older one. Content marked in red will not be shown if the version to rollback to is selected, content marked ingreen is new.

Also using Umbraco's event model you can easily clean up old versionsautomatically, or you can use Umbraco's free tools.

Quick Take Review: Umbraco Web Content Management System I

Umbraco is one of only a few open source web content management systems built on Microsoft's .NET technology stack. This CMS is no "out the box" solution. To the contrary, it's a content management system for .NET web developers. And while it's relatively straightforward to use, one must first deal with a steep learning curve.

We took a close look at the latest version of Umbraco (v4.01) and here's what
we found.

Introducing Umbraco

When getting started with Umbraco there are some key themes to keep in
mind:



  • A CMS for developers — Empower web developers

  • Steep learning curve — Straight forward to use once you get over that learning curve

  • Not an out of the box, modular solution — Customized to meet your needs

  • A framework for .NET web developers

Umbraco was not designed to be a plug-and-play solution like Drupal or Joomla. Niels Hartvig, the creator of Umbraco, tried to build a system that didn't limit him on what he could do and yet still pleased non-technical clients. That was seven years ago.

Today, Umbraco is one of the best known .NET open source web content management systems. Downloads of the CMS have grown 100% in the last six months, with over 7,500 downloads happening a week.

The recent event of the Microsoft Web Platform Installer (WPI) has proven a boon for Umbraco. It's currently listed as one of the most popular applications in the WPI gallery, with more than 36,000 downloads to date.

With the MS WPI you can easily get the CMS up and running. But once you get
there, you've got some thinking and planning to do.

The Basic Story

VendorUmbraco
Product
Umbraco v4.01
Product Category
Web content management, simple web cms, web publishing
Typical Scenario
basic websites, micro publishing websites
Bad Fit Scenario
Enterprises that want enhanced workflow without adding 3rd party provider, organizations without a development team with some intermediate to advanced .NET programming skills.

Company & Product History

The first version of Umbraco came out in 2001 and was built on ASP and COM. The first open source version arrived as a Beta 2 in October 2004 and was officially released in February 2005. That version was built on ASP.NET 1.1.

The Road to Open Source

Umbraco is the brain-child of Danish born Niels Hartvig. The original code wascreated to help him build web solutions for his clients — back when he had a freelance consulting business. Foreshadowing the future path for the project, Hartvig would often allow Umbraco to be used for free by other freelancers with whom he shared an office.

Hartvig found that by allowing others to use Umbraco, he was getting really good feedback and suggestions for improvements that he may not have gotten otherwise. The decision to go open source was not strategic, according to Hartvig, it just "felt right".

Not Meant to be Plug-and-Play

As we have said, Umbraco is not an out of the box solution in the sense that you can install it and with some minimal configuration and customization away you go. No. There's a little more to using this web content management system than that. And that is the way Hartvig likes it. You see, he doesn't believe in plug and play solutions. To him, organizations tend to focus more on the tools and not as much on their needs.

Hartvig believes that modular OOTB solutions lead organizations to think they have a common language when they really don't.

He offered an example of a company saying they wanted a forum. The consultant knew that software x had a forum, so they implemented it and gave the customer, so what the consultant gave them was a forum: http://forum.umbraco.org.

Unfortunately all the company really wanted was a simple way to communicate with their customers. Hartvig says that we spend too much time focusing on the technology of content management and not enough about understanding and defining the needs.

Once the organization truly understands their needs, Umbraco is there to meet them.

A Small but Evolving Company

Hartvig quit his consulting business in 2007 to do Umbraco full-time. There are 2.5 people in the company — active community member Per Ploug Hansen became a partner last year — building the software and training people to use it.

The latest version — 4.0.1 — was released in March.

There's a really great story behind how Umbraco went from being a little solution to help with the consulting business to being one of the most popular downloads on the Microsoft Web Platform Installer, but we really want to get to the meat of this review.

Market & Pricing

Umbraco is not actively marketed, it has evolved naturally. When asked what the target market was for Umbraco, Hartvig said that it was hard to place because it is free. He says it is attractive to smaller projects, but it isn't plug and play like Drupal or Joomla.

Used by skilled freelances for small projects, Umbraco also supports some fairly big sites like heinz.com, deanfoods.com, wired.co.uk and naias.com.

Pricing

Umbraco is open sourced licensed under the MIT open source license.

There are two versions of Umbraco, free and professional. Both versions have the same core product. Professional comes with additional options like support and tools. There are several flavors of the Professional version as described in the figure below.

UmbracoVersions.jpg UmbracoVersions2.jpg

Hartvig says that they hope 1% of their market will become customers by 2010,
either as PRO subscribers or
Umbraco.tv subscribers.

Umbraco Tools

Pro subscribers get a couple of tools that are good to have:

Umbraco Courier: Courier enables you to easy move your website from a staging environment to production. You can do things like deploy an entire website, sync up content between environments or add new functionality to a staging server.

Umbraco Concierge: Concierge shows developers what's installed and what's in use in their Umbraco implementation. It also monitors action handlers and registered third party applications so you know what is interfacing with the Umbraco event model.

Umbraco.tv

In addition to the Pro version, Umbraco also offers a subscription to Umbraco.tv, a website that contains over 6 hours of video tutorials that teach you the ins and outs of building Umbraco. There are videos for site builders, site developers, and soon, editors. New videos are added monthly and depending on the subscription you purchase, the videos are available for the iPod/iPhone.

Umbraco just came out with a new pricing model for Umbraco.tv: 19 EUR per month (~ US$ 25) for a single user personal license. This includes unlimited access to all the videos and source code to select videos. You can cancel the monthly subscription at any time. There's also a 12 month subscription for a single license and a business license.

An Open Source Story - Evolution of the Umbraco CMS

Not all products are built with loads of venture capital in the coffers. Many are grown slowly and painstakingly over a number of years. A labor of love? Maybe. Some unseen driving force pushing them? Most likely.

In this article brings you the history of the Umbraco Web CMS, from a .NET toolkit used as part of founder Niels Hartvig's consulting business to being one of the most popular .NET open source web content management systems in the market.

Sowing Umbraco Seeds

Niels Hartvig started building Umbraco in 2001 as a content management system that would help achieve his client’s needs. Niels was working at a time when web content management systems weren’t nearly as prolific and mature as we have today.
So he worked with clients to develop custom solutions and the roots of what became Umbraco are based on those original problems solved and code libraries developed. Umbraco was designed not to limit Niels on what he could do and at the same time deliver to clients the functionality they needed.

Going Open Source

The first open source version of Umbraco was released in February 2005. Niels says there was no strategic thinking behind the decision to take Umbraco open source. To Niels “it just felt right”.
Working in a shared office space, Umbraco was often used by the other free agents for free. In return, Niels picked up some consulting hours. These consultants always came back with great feedback – whether they were developers or designers. At the same time, clients were coming with a list of improvements. It occurred to Niels that the more people who had access to Umbraco Web CMS, the better it would become.
But he needed to make money too. So he came up with the idea to charge 3% of each project. Of course everyone thought it was a “brilliant and democratic idea” until the time came to pay. So Niels continued consulting even though what he really wanted to do was work on Umbraco.

Crossing the Bridge

Over time the project was consuming more and more energy, and Niels found himself under-prioritizing client work. Client satisfaction was dipping, stress was rising and it became clear that he'd reached an all or nothing fork in the road.

Niels reports that he didn’t have the confidence he needed to make the leap. Not seeing how it could possibly work, he went pseudo all-in during 2006.

What he did was charge for support on a per ticket basis, to former clients who used Umbraco. In the end, it was basically doing the same thing as consulting and he realized the model was not working out.

Becoming even more frustrated and still not making money, Niels sat in a meeting with the Danish IRS who threatened to close him down if he didn’t pay them the money he owed.

It was his wife who made him realize what he needed to do. She told him that “this is what you get from not really believe in what you do. From only doing it half.” She asked him if he could do it 100% and he said yes, knowing he was going to be living for nothing.

Together they went to the bank and got the money to pay the IRS (Niels says it was magic). But he was still not going to have any money to finish the next version of Umbraco.

So he went to the Umbraco community and said version 3.0 would not be completed. He was broke. It was the end of the road.

And like any good community who believes in their solution, they blew his mind and together they raised $15,000 in donations to finish the version. This was the turning point for Umbraco.

Making it Profitable

In early 2007, Niels launched the Umbraco courses which were an instant success. In late 2007 he launched the professional version of Umbraco — another instant success. And recently they've kicked off Umbraco.tv, a subscription-based service for online training which starts off at about 19 EUR per month for a personal account.

Last year Ploug Hansen, an active freelancer in the Umbraco community became a business partner. Three months later the project became profitable (and Niels paid off the tax office).

What are the morals of the Hartvig/Umbraco story? It seems to us that, a) never do anything half way, b) respect, develop and rely on your community, and c) if you doubt the open source paradigm be sure to consult your wife.

Umbraco - Setup a CMS in your Company for free

If you have to setup a documentation system in your company Umbraco CMS is a very good solution.

Umbraco is an open source CMS written in ASP.NET , it works with IIS (Internet Information Services) and with Sql server Express, of course if works in Windows XP/2003/Vista.
In the market there a a lot of CMS open source, but Umbraco has some very good features:

- The interface is very user friendly, it uses a lot of JavaScript and permits to do a lot of thing in an easy way.

- You can create a master page of your website

- You can create documents that uses that master page. In each document you can add the fields (meta-data) that the user has to input, for each field you define the type of control and if it is mandatory or not.

- You can integrate your pages with xsl macros. The macro are quite easy to implement. In my case i have created a search that was looking inside some of my fields for the information.

- The system permits to define the users roles, to have documents revisions, send document to translation and other interesting features.

- The program shows in two different pages the documents and the images, you can create a different folder structure without problems.

A feature that I like is the possibility to use Microsoft Live Writer or Microsoft Word 2007 to edit the documents directly from your computer. It permits to save images in a very easy way.

The new version 4 also has a very good feature that permits to edit the website while you navigate.

Also if you are a .net developer you can always add new personalized controls to your website.

Sitecore Content Management System Implementation Notes

Before getting into Sitecore, let’s look at CMS implementations in general.

CMS Implementation – 4 questions


For a few minutes, forget about the technology. Don’t even think about tthat until you can answer these questions:

1.) Why do you want or need a CMS?

This seems like a simple question…but if your answer is to ‘manage web content’, you haven’t completely thought through the strengths of a CMS. Content Management Systems provide much more than just content management; they provide a means to push content ownership out to the subject matter experts. This holds true for all CMS platforms, whether Sitecore, Ektron, Umbraco, Interwoven, Drupal, Wordpress (yes..it is a great CMS) or one of the many others.

2.) How will you allow content owners to actually own the content?

When you get your CMS in place, how will your organization push out ownership of the content? What processes can you put in place to allow you to open your CMS to the all content owners. And…yes…i used the word ‘process’. Don’t overdo it though!

3.) Who “owns” the CMS?

This is a loaded question. While the CMS is a content platform, is it owned by the IT group? Sure, the platform itself is an IT platform and needs IT services to keep it running, but should the IT group ‘own’ the platform? {My answer: No – the business unit(s) should}

4.) Do you have a web & marketing strategy? Who “owns” this strategy?

This is one of the questions that seem easy..but it isn’t. Does your marketing department own the web? IT? PR? Who sets your web strategy? Do you have a strategy? How does your CMS driven web fit into your marketing strategy?

Answer these questions before you move into your CMS implementation program and you’ll save yourself a lot of trouble. I’m working on another article that addresses these questions (and others) that should be part of an organizaiton’s technology selection strategy plan…look for that article in the future.

Sitecore CMS Implementation Thoughts

Now, its time to look at the technology. For those that don’t know, Sitecore CMS is a .NET platform. If your organization is a Microsoft shop, Sitecore is a great fit for you. You do have other options (Sharepoint, OpenText, etc) but my experience has me recommending Sitecore over all others in the .NET world.

Pre-implementation


Prior to selecting Sitecore (or any CMS), you’ve got to take some time to think about your processes & workflows. Determine who will have the ‘final word’ on how content is published and where it lives. Set some web standards (if you don’t have them already) and determine your content architecture & strategy. Will you be reorganizing your content? How about a new design? Easy decisions right?

You’ve answered the four questions above and figured out the high-level stuff…that was easy right? Not really…its harder than it seems but determining this stuff up front will help tremendously once you start implementing Sitecore CMS as it will driving your implementation strategy and plan.

If you’ve got the budget, hire an outside consultant to help you with this step in the project. If you bring in the right consultant, they could also act as the overall CMS Program Manager (more on this later).

Implementation

Now that you’ve worked through the pre-implementation phase, what now? Time to get your Sitecore CMS platform implemented.

What’s the first step? Grab your development staff and get some Sitecore Training to get certified. This certification is much more than just a piece of paper…it gets your team to a point where they can understand the Sitecore terminology and best practices. This often overlooked step in CMS implementations tends to come back around and haunt the organization at a later date. Spend the money up front and you’ll save money in the long run.

Implementing the basic Sitecore CMS system is a fairly straightforward process. The hardware requirements are well documented and installation is straightforward. Sounds easy right? So far, it is.

You’ve found the hardware, configured it and run the Sitecore CMS installation program. Now it’s time to look at splitting your CMS implementation efforts into three parts: Development, Content & Training

Development – Developing for Sitecore CMS platform isn’t too different than any other .NET development effort. Using .NET best practices, development isn’t too difficult, but the architecture of the platform is extremely important. Take some time to think about your content and IT infrastructure at this point.
Content – You’ve got a Content Management System (or at least one that is being implemented). Time to start implementing your content architecture plans and filling your sitecore tree with content. This initial Content work should be done by a single content team…do not leave this work to your content owners. Take this opportunity to reorganize your content as necessary.
Training – In addition to developing out your website, applications and content, you’ve got to start introducing Sitecore CMS to your organizations’ users. This means lots of meetings, training and discussions of what the CMS is and how it can help them. One of the often overlooked pieces of a CMS implementation is end-user training. Not only do you need to train the organization in the use of the platform, but also in the organizations web & content strategy.
As you can see, implementing a CMS platform like Sitecore is quite a large undertaking even for a smaller organization, but with proper planning and knowledge of Sitecore CMS, you’ll do fine.

Managing the Implementation

CMS implementations are much more than a ‘project’…you’ve got a Program here. From my experience, an implementation in a medium to large organization requires a Program Manager to lead the different projects with project managers heading up each of the main thrusts of the project (Hardware, Development, Content, Training).

There are many different pieces to an implementation. You’ve got to worry about IT Infrastructure, Software development, web design, web content and other topics. Spend the money upfront to get a good Program Manager (use an external consultant if needed) and Project Managers (you could use internal PM’s for this). If you approach this right (and have the budget), you can bring in a consultant to help throughout the project (from technology selection through final implementation).

While a CMS implementation is a large undertaking, it’s fairly straightforward if you have some knowledge in web strategy, technology, content, marketing and Sitecore CMS. While there are a lot of technical issues to work through, the most difficult part of a CMS implementation is really the content strategy, user education and user adoption aspects…this is where experience and thought leadership comes into play.

If you’re looking to implement a CMS (Sitecore or otherwise), forget about the technical aspects of the CMS when you start out…look at the business first to make sure it is capable of sustaining your web & content strategy. Understand the business needs first then find your CMS and implement the proper workflow and content architecture to meet the current and future needs of the organization. This is a common sense stuff, but often overlooked when it comes to CMS projects.

Macro Parameters syntax

What is Macro parameters?

A macro parameter is in short a value you send to a Macro from Umbraco. This could be piece of text, a node ID or even a big chunk of xml. To do this you have a handfull of different form controls you can use:

  • bool - A true/false value
  • contentPicker - the ID of the selected node as a single integer.
  • contentRandom - the xml from a random node.
  • contentTree - the xml of the selected node and it's child nodes
  • contentType - the alias of a selected content type as a string
  • contentTypeMultiple - a comma separated list of selected content type aliases
  • mediaCurrent - the xml of the selected media item
  • numer - an integer
  • propertyTypePicker - the alias of the selected property type
  • propertyTypePickerMultiple - a comma separated list of selected property type aliases
  • tabPicker - the caption of the selected tab
  • tabPickerMultiple - a comma separated list of selected tab captions
  • text - a text string
  • textMultiline - a text string.

Let's continue and look at how you use macro parameters with an xslt macro and what they look like in your xslt.

Setting up a macro parameter

First let's create a simple xslt script which will have 2 simple parameters, a text string and a contentTree type - to recap: A text type is a simple string and a contentTree type is the xml of a selected node.

  • Adding the parameters
  • Create a xslt macro
  • Look under the "parameters" tab on the macro settings screen.
  • Create a new parameter the alias "text" name "Text property" and type "text"
  • Create a second parameter called "contentTree" with the name "Select Node" and the type "contentTree

Writing some basic xslt

Okey so now we have a macro with some parameters. Lets get these parameters into the xslt.

Our Xslt code (without the stylesheet info):

<xsl:template match="/">
<xsl:copy-of select="/macro/text">
<xsl:copy-of select="/macro/contentTree">
</xsl:template>

Inserting the macro on a template

Write some text and pick a node in the content tree by clicking "choose item" - then save. Go take a look at the page in your browser (try viewing the source of the page to see what it actually returns)

Great, you're done with setting up parameters and getting the data into a xslt macro. Let's continue and look at what that data actually look like and how it actually works...

Working with parameters in xslt

Okey so sofar we've setup a simple xslt script, added 2 parameters and picked some simple data for the parameters when we inserted the macro in a template.

So what does the 2 parameters return?

The <xsl:copy-of select="/macro/text" /> returns:

<text>Hello World</text>

The <xsl:copy-of select="/macro/contentTree" /> returns:

<contentTree nodeID="1053">
<node id="1053" version="a1e061ab-3109-4690-9374-bd0f05882e9b"
parentID="1052" level="2" writerID="0" creatorID="0"
nodeType="1044" template="1043" sortOrder="1"
createDate="2005-12-30T14:01:21" updateDate="2007-06-21T14:06:32"
nodeName="About" urlName="about" writerName="Administrator"
creatorName="Administrator" nodeTypeAlias="wwTextpage"
path="-1,1052,1053">
<data alias="bodyText">Body text...</data>
<data alias="header">My Header text...</data>
</node>
</contentTree>

So as you can see: the text parameter simple sends the text string we entered to the macro and the contentTree paramater sends a big chunk of xml describing the node we selected. If the node had any child nodes these would also be send to the xslt macro as xml.

Explaining how the parameters are send to the macro

When you setup a macro parameter for a xslt macro. You basicly tell umbraco to send some xml to the xslt script. This xml looks something like this:


<macro>
<parameteralias1>Value</parameteralias1>
<parameteralias2>Value</parameteralias2>
</macro>

So with this infomation along with some basic xpath we can query the xml from the parameters. which is what are doing with "/macro/text" which will get the value from the "text" parameter and the "/macro/contentTree" which will get the value of the parameter with the alias "contentTree" we could then go on a do some basic xpath work on the contentTree macro to return the selected nodes name like this:

<xsl:value-of select="/macro/contentTree/node/nodeName"/>

or get it's bodyText value with

<xsl:value-of select="/macro/contentTree/node/data [@alias = 'bodyText'"/>

Okey so now we are able to define parameters, input some data, get the data to the xslt and work with it in the xslt file. Let's continue to take a look at all the different types of parameters and what they look like in xslt

XSLT Logic, Variables and Parameters

Some XSLT Logic

XSLT has some logic commands that useful to processing criteria based output. These commands are the "if" and "choose" commands.

The "if" command is useful for deciding to show content or not based on a single criteria. There is no "else" in XSLT, so, the if is somewhat limited.


<xsl:if test="@nodeName = 'example' ">


<!-- do this -->


</xsl:if>


The "choose" command is a bit more powerful in that it allows for multiple choices to be selected from.

<xsl:choose>


<xsl:when test="">


<!-- do this -->


</xsl:when>


<xsl:otherwise>


<!-- do this -->


</xsl:otherwise>


</xsl:choose>


In this example, you can have as many when statements as you like, but must have the otherwise statement.
Using Variables and Parameters

Variables and parameters are temporary storage devices in XSLT for holding simple values to complete node sets of data.

Variables are defined with a name, and can be filled two different ways. The first method is to select the data into the variable as follows:


<xsl:variable name="myID" select="$currentPage/@id"/>

The second method is to fill the variable by having the content rendered into the variable.

<xsl:variable name="myID">


<xsl:value-of select="$currentPage/@id"/>


</xsl:variable>

The second method is useful when applying logic to filling the variable, in which case an if command or choose command would allow you to have the value selected logically.

Parameters are handled the same way, except their command is "xsl:param".

As for the difference, it is a matter of where they can be assigned.

Using XPATH

Now that we know what is stored in the XML, and know where the XML is in our XSLT, we can now try to retrieve the data, and format it to our needs.
As previous mentioned, XSLT uses an XML structure to define the processing rules. So we need to learn what a few of the processing elements for XSLT are.
Displaying content from the XML document
First, one of the most important elements is the "value-of" command. It is written as follows:


<xsl:value-of select="...."/>


This command is one of the most prevalent, and has a couple additional attributes to allow for the output to be controlled as needed. We will look into that later.

In the template area of the XSLT file, we can write our first output now using the value-of command. We know our data is in the $currentPage parameter, and its context is focused on the requested page's node. Thus, if we want to get the name of the current page, we can use the "nodeName" attribute of the node to display the name. Attributes are referenced in XPATH using the "@" with the name of the attribute following, thus "@nodeName".

<xsl:template match="/">


<xsl:value-of select="$currentPage/@nodeName"/>


</xsl:template>


To explain, the "$currentPage" is looking at the node in the XML document for the current requested page. The "/" is telling us to look at all child elements and attributes. The "@nodeName" says we want the attribute named "nodeName".
Placing the macro on a template would render the name of the current page when the template is displayed.
Going a bit deeper, we may want to display user input content, such as a simple text field named "Website". This is set up in the document type as a text field with the alias "Website". Since this is not a default property, it is referenced using the data element, which there may be multiple of, depending on the number of custom properties on the document type. Thus, referencing this property, our template would look like this:


<xsl:template match="/">


<xsl:value-of select="$currentPage/data [@alias='Website']/text()"/>


</xsl:template>


To explain, we are again focused on the child elements of the current page, which we select the ones that have the element name of "data". We go one step further, and filter that selection with the usage of "[@alias = 'Website']", which is called a predicate.
The predicate acts as a filter, only returning the results that match the test specified. In this case, only returning the data element that has an "alias" attribute with the value of "Website".
The results are then passed along to the next item that selects the child items, and we return the text of this element. (The "/text()" is optional, but typically helps some understand the context of their statement.)
Now that we can list out the data from our documents, it is time to go deeper.

Another useful command in XSLT is the "for-each" command. This command takes an XPATH statement and iterates the results for each match, executing the nested commands each time. The "for-each" command looks as follows:

<xsl:for-each select="....">


...


</xsl:for-each>



So using this command, we can select multiple items and list them out with a very simple call.

Lets say that our current page has 5 sub-pages, named one, two, three, four, and five. We want to list those 5 pages names on the current page. Thus, we need to loop through the child nodes of the current page.


<xsl:for-each select="$currentPage/node">


<xsl:value-of select="@nodeName"/>


</xsl:for-each>

To explain, we are selecting all child node elements from the current page, looping each node. The value-of is selecting only the attribute named @nodeName.

Confused? Don't be. The value-of inherits the context of the for-each command, thus, it knows it is on the current node in the loop. If that confuses you too much, you can always write the statement as such:


<xsl:for-each select="$currentPage/node">


<xsl:value-of select="current()/@nodeName"/>


</xsl:for-each>

or

<xsl:for-each select="$currentPage/node">


<xsl:value-of select="./@nodeName"/>


</xsl:for-each>


Using "current()/" allows you to easily see that you are working against the current item in the loop, and the "./" notation is actually saying select myself.
The resultant output of this will be the five pages listed without any markup, which will be rather difficult to read. So, lets add some unordered list markup for usage in our website.


<ul>


<xsl:for-each select="$currentPage/node">


<li><xsl:value-of select="current()/@nodeName"/></li>


</xsl:for-each>


</ul>


Now, we will get bulleted list of page names.