Umbraco User's Guide
By Nik Wahlberg and Paul Sterling
4/5
()
About this ebook
More companies are turning to the power and simplicity of Umbraco's web content management system to build robust, customized sites. Written by leaders in the Umbraco community, this invaluable guide takes you through every aspect of this open source tool. Code samples using XHTML, CSS, XSLT, and C# are integrated throughout the pages to illustrate key concepts that you can apply. As you work through the chapters, you'll progress from building a basic Umbraco site to a sophisticated one that meets the needs of your organization.
Umbraco User's Guide:
- Explains how to install Umbraco and walks you through its XML structure
- Discusses how to create templates while building your understanding of layouts
- Offers best practices for developing content, designing types, organizing templates, and using the rich text editor
- Walks you through XSLT and .NET controls
- Helps you build sample applications and troubleshoot any issues that arise
- Covers how to create your own classified ads site by combining document types, templates, styles, macros, and more
Related to Umbraco User's Guide
Related ebooks
The Bricks Builder Blueprint Rating: 0 out of 5 stars0 ratingsBuilding Single Page Applications in .NET Core 3: Jumpstart Coding Using Blazor and C# Rating: 0 out of 5 stars0 ratingsBizTalk Server 2016: Performance Tuning and Optimization Rating: 0 out of 5 stars0 ratingsASP.NET 2.0 Web Parts in Action: Building Dynamic Web Portals Rating: 0 out of 5 stars0 ratingsVue.js: Tools & Skills Rating: 0 out of 5 stars0 ratingsThe Definitive Guide to Getting Started with OpenCart 2.x Rating: 0 out of 5 stars0 ratingsVisual Studio Tips and Tricks: I Rating: 0 out of 5 stars0 ratingsDrupal 8 Blueprints: Step along the creation of 7 professional-grade Drupal sites Rating: 0 out of 5 stars0 ratingsLearn ASP.NET MVC Rating: 4 out of 5 stars4/5The Little Book of Sitecore® Tips: Volume 1 Rating: 0 out of 5 stars0 ratingsBeginning ASP.NET for Visual Studio 2015 Rating: 0 out of 5 stars0 ratingsLearn ASP.NET Core MVC - Be Ready Next Week Using Visual Studio 2017 Rating: 5 out of 5 stars5/5The iSeries and AS/400 Programmer's Guide to Cool Things Rating: 3 out of 5 stars3/5Vue.js: 11 Practical Projects Rating: 0 out of 5 stars0 ratingsEvaluation of Some Android Emulators and Installation of Android OS on Virtualbox and VMware Rating: 0 out of 5 stars0 ratingsC# For Beginners: An Introduction to C# Programming with Tutorials and Hands-On Examples Rating: 5 out of 5 stars5/5Computer Productivity Book 3. Use AutoHotKey to License & Deploy Your Scripts to Sell: AutoHotKey productivity, #3 Rating: 0 out of 5 stars0 ratingsAutodesk Fusion 360 Basics Tutorial Rating: 0 out of 5 stars0 ratingsMagento Made Easy: Comprehensive Guide to Magento Setup and Development (Vol. 1) Rating: 0 out of 5 stars0 ratingsBlazor Revealed: Building Web Applications in .NET Rating: 0 out of 5 stars0 ratingsAfter Effects CC Digital Classroom Rating: 3 out of 5 stars3/5IBM WebSphere Application Server Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsWorking with Vue.js Rating: 0 out of 5 stars0 ratingsMeteor: Full-Stack Web Application Development Rating: 0 out of 5 stars0 ratingsSpring Boot Intermediate Microservices: Resilient Microservices with Spring Boot 2 and Spring Cloud Rating: 0 out of 5 stars0 ratingsASP.NET Application Development Fundamentals Rating: 0 out of 5 stars0 ratingsmacOS App Development: The SwiftUI Way Rating: 0 out of 5 stars0 ratingsPerformance Project Rating: 0 out of 5 stars0 ratingsXamarin: Cross-Platform Mobile Application Development Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding For Dummies Rating: 5 out of 5 stars5/5How to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5No Place to Hide: Edward Snowden, the NSA, and the U.S. Surveillance State Rating: 4 out of 5 stars4/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsAn Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Podcasting For Dummies Rating: 4 out of 5 stars4/5JavaScript All-in-One For Dummies Rating: 5 out of 5 stars5/5Web Design For Dummies Rating: 4 out of 5 stars4/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5How to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsHTML in 30 Pages Rating: 5 out of 5 stars5/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 4 out of 5 stars4/5How To Start A Profitable Authority Blog In Under One Hour Rating: 5 out of 5 stars5/5The Gothic Novel Collection Rating: 5 out of 5 stars5/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratingsWordPress For Dummies Rating: 0 out of 5 stars0 ratingsPython: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5Surveillance and Surveillance Detection: A CIA Insider's Guide Rating: 3 out of 5 stars3/5Cybersecurity For Dummies Rating: 5 out of 5 stars5/5Coding with AI For Dummies Rating: 0 out of 5 stars0 ratingsCybersecurity All-in-One For Dummies Rating: 0 out of 5 stars0 ratings
Reviews for Umbraco User's Guide
1 rating0 reviews
Book preview
Umbraco User's Guide - Nik Wahlberg
Part I
Creating Your First Site with Umbraco
CHAPTER 1: Installing for the First Time
CHAPTER 2: The Umbraco Approach
CHAPTER 3: Document Types
CHAPTER 4: Templates, Markup, and Master Pages
CHAPTER 5: Using Macros
CHAPTER 6: Languages and Dictionaries
CHAPTER 7: Multiple Sites, Hostnames, and Localization
Chapter 1
Installing for the First Time
What are the steps for installing Umbraco?
How do you upgrade your current site?
Which Umbraco starter kit should you use and how do you install it?
How do you apply and manipulate Umbraco skins?
How do you find and install Umbraco modules?
Users have installed Umbraco literally hundreds of thousands of times in a variety of environments — everywhere from an entry-level Windows XP machine, to multiserver load-balanced sites, and even to Microsoft Windows Azure. In the vast majority of these cases the installations complete successfully and take no more than a few minutes. The first section of this chapter contains the Umbraco quick start instructions for facilitating a successful install. Read it, install Umbraco, and then continue reading for additional considerations.
You can always find the latest released version of Umbraco on the Umbraco CodePlex home at http://umbraco.codeplex.com/ from the Downloads tab. The latest version of Umbraco is also available via Microsoft's Web Platform Installer and Web Application Gallery (http://www.microsoft.com/web/gallery/umbraco/). This chapter offers a detailed overview for installing Umbraco with both the Microsoft Web Platform Installer and directly from the Umbraco installation file downloaded from the Umbraco CodePlex home.
Installing Umbraco
The text in this chapter, as well as the rest of the book, assumes that you have a PC running Windows Vista or Windows 7 and have user permissions sufficient enough to allow for administrative actions. If this is not the case, or if you are installing to a different environment (such as to a shared-hosting account) skip this section for now and refer to Chapter 14, which has troubleshooting tips. One important item to note is that Umbraco is best installed as a website root rather than as a virtual directory under a web root, so plan on running Umbraco from a web root. All current versions of Internet Information Server (IIS) support multiple web roots so running from a web root is not an issue unless you are using IIS5 on Windows XP. See Chapter 14 if this is the case.
Installing Umbraco using the Microsoft Web Platform Installer
The best way to begin your Umbraco installation is by using the Microsoft Web Platform Installer (a free installation tool developed and supported by Microsoft). Some advantages to using the Microsoft Web Platform Installer (shown in Figure 1.1) are that the tool can:
Automatically detect and install required dependencies.
Create a Microsoft SQL database or Microsoft SQL CE database prior to installing Umbraco.
Create and configure new websites in IIS.
Figure 1.1
1.1You can find the Microsoft Web Platform Installer at www.microsoft.com/web/ along with the latest versions of Umbraco and other web applications as well as any required dependencies. In addition, the Microsoft Web Platform Installer is available as an IIS extension at www.iis.net/extensions/WebPI/ and is integrated into web hosting control panels such as cPanel and DotNetPanel. Using a web host's control panel to install Umbraco in a shared hosting environment can greatly simplify the installation process.
Use the following steps to install Umbraco with the Web Platform Installer:
1. Launch the Web Platform Installer from the Microsoft Web Application Gallery (http://www.microsoft.com/web/gallery/Umbraco).
2. Review the list of files that the Web Platform Installer will download and install.
note The list of installation files that the Web Platform Installer presents may only include the Umbraco Content Management System (CMS) component if you already have the required dependencies, such as SQL Server and the .NET Framework, installed.
3. Select the Microsoft SQL Server CE database option as shown in Figure 1.2.
Figure 1.2
1.24. Select New Web Site from the Web Site drop-down menu as shown in Figure 1.3.
5. Enter the site information for Site Name, Path, Port, Home Directory, and Host Name.
note The author recommends leaving the Umbraco CMS Application Name blank, as shown in Figure 1.4.
Figure 1.3
1.3Figure 1.4
1.46. When the Web Platform Installer completes the installation process, click the Launch Umbraco CMS link to launch the Umbraco Installation Wizard.
7. When the Umbraco Installation Wizard loads in your browser, you see the Welcome screen (Figure 1.5). Click the Let's get started! button to complete the steps required to configure your Umbraco installation.
Figure 1.5
1.58. To continue, read and accept the Umbraco license by clicking the Accept and Continue button as shown in Figure 1.6.
9. Because you selected Microsoft SQL CE from the Web Platform Installer, the correct database options will already be set. Click the Install button to complete the Umbraco database configuration as shown in Figure 1.7.
10. Once the database is installed and configured completely, click the Continue button as shown in Figure 1.8.
Figure 1.6
1.6Figure 1.7
1.7Figure 1.8
1.811. Create an Umbraco user by providing a username, email, and password and then clicking the Create User button. You can also register for the Umbraco newsletter using the email address you provide by selecting the Sign up for our monthly newsletter check box as shown in Figure 1.9.
12. From the Starter Kits screen, you can browse descriptions of each of the Starter Kits by hovering over their icons. To install a Starter Kit, simply click one of the Install this kit buttons.
note If this is your first time installing Umbraco, the author recommends selecting the Simple Starter Kit as shown in Figure 1.10. You can find more detailed information about the Starter Kits in the Utilizing Umbraco Starter Kits
section later in this chapter.
13. Once the Starter Kit is installed, you have the option of installing a skin from the Install a Skin screen. Umbraco Skins are a simple way to make your Starter Kit beautiful. You can preview a skin by hovering over the skin icon and install a skin by clicking the Install button as shown in Figure 1.11.
Figure 1.9
1.9Figure 1.10
1.10Figure 1.11
1.1114. Once the skin is installed you will see the You're done screen as show in Figure 1.12. From this screen click the Preview your new website button to launch the skin editor or the Set up your new website button to launch the Umbraco backoffice. This screen also has a collection of useful links to additional information about getting started working with Umbraco.
You're all done and Umbraco is ready for use, complete with a fully functional web site and beautiful skin! As you can see, when you compare the process to a manual installation as discussed in the next section, using the Web Platform Installer greatly simplifies the setup and configuration of the website and database requirements for Umbraco.
note A limitation of using the Microsoft Web Platform Installer to install Umbraco is that only Microsoft SQL databases are supported. If you want to install Umbraco using a MySQL database, you must configure the database prior to running the installation from the Microsoft Web Platform Installer. You then provide the database connection information during the Umbraco Installation Wizard database configuration step rather than during the Web Platform Installer configuration step.
Figure 1.12
1.12Installing Umbraco Manually
Although using the Microsoft Web Platform Installer to install Umbraco is strongly advised, cases may exist where a manual installation is desired. In such a case, you must manually complete the steps to create the IIS website, create the database, and set required permissions. The following are the steps to complete a manual installation of Umbraco: If you find yourself stuck on one of these steps, try installing Umbraco using the Quick Start steps first and then return to this section later.
1. Create a new folder with a unique name for your Umbraco installation on your local hard drive.
2. From IIS Manager create a new site and set the home directory to be the new folder; leave the remaining settings at the default.
3. Set permissions on the new folder to allow the new site's application pool identity (usually this is the Network Service or Application Pool Identity account) to Modify, Read & Execute, and Write.
4. From SQL Management Studio create a new database and assign a login to the dbo role for the database. Make a note of the SQL instance name (such as ./SQLEXPRESS), the database name, and the login name and password.
note You may skip step 4 if you want to use the Microsoft SQL CE option later in the installation.
5. Download the latest Umbraco release from the Umbraco CodePlex home Downloads tab (http://umbraco.codeplex.com/).
6. Copy the Umbraco files from the .zip archive into the new folder. Make sure to unblock the .zip file from the Windows File Property dialog before extracting the contents.
7. Open a web browser and navigate to the root of the new site.
8. When the Umbraco Installation Wizard loads in your browser, you will see the Welcome screen (Figure 1.13). Click the Let's get started! button to complete the steps required to configure your Umbraco installation.
Figure 1.13
1.139. To continue, read and accept the Umbraco license by clicking the Accept and Continue button as shown in Figure 1.14.
Figure 1.14
1.1410. Select the Microsoft SQL Server option in the Database Type drop-down list and enter the Connection Details you created in step 4 (see Figure 1.15). Click the Install button to create and configure the Umbraco database.
11. Once the database is installed and configured completely, click the Continue button as shown in Figure 1.16.
12. Create an Umbraco user by providing a username, email, and password and then clicking the Create User button. You can also register for the Umbraco newsletter using the email address you provide by selecting the Sign up for our monthly newsletter check box as shown in Figure 1.17.
13. From the Starter Kits screen you can browse descriptions of each of the Starter Kits by hovering over the Starter Kit icons. To install a Starter Kit click one of the Install this kit buttons as shown in Figure 1.18. You can find more detailed information about the Starter Kits in the Utilizing Umbraco Starter Kits
section later in this chapter.
14. Once the Starter Kit is installed you have the option of installing a skin from the Install a Skin screen. You can preview a skin by hovering over the skin icon and install a skin by clicking the Install button as shown in Figure 1.19.
Figure 1.15
1.15Figure 1.16
1.16Figure 1.17
1.17Figure 1.18
1.18Figure 1.19
1.1915. Once the skin is installed you will see the You're done screen as show in Figure 1.20. From this screen click the Preview your new website button to launch the skin editor or the Set up your new website button to launch the Umbraco backoffice. This screen also has a collection of useful links to additional information about getting started working with Umbraco.
You now have everything you need to successfully run, build, and extend Umbraco. Obviously not all Umbraco installations will fit into the preceding step-by-step instructions. The remainder of this chapter covers additional considerations for other installation scenarios and environments.
A Note on Security
One item that some readers will no doubt notice is that the permissions settings in the preceding manual installation are less than optimal from a security perspective. For a production or public-facing website, you will likely make some additional, more finely grained adjustments to a site's home folder and files. The website http://our.umbraco.org/wiki/ is a good starting point on what settings to adjust.
Figure 1.20
1.20Tips for Installing Umbraco in Special Environments
One of the great strengths of Umbraco is its simple architecture, which enables it to adapt to a variety of installation and usage scenarios. Certainly the earlier quick start is a simple scenario intended for use on a single machine — most likely a web builder's desktop or laptop — but you can use this same procedure to install Umbraco on a netbook running Windows 7 or a web server running Windows 2008. This procedure is also appropriate for installing an evaluation instance, for an install used to test
a feature or to reproduce a defect, as well as for a fresh start when building websites with Umbraco.
Debugging in a Development Environment
For web developers, especially those working with .NET user controls integrated with Umbraco, the ability to debug code while running Umbraco is important. You can easily do this debugging by installing Umbraco onto the same physical machine that has Visual Studio installed. This can be on a local development laptop, a virtual machine, or a remote development machine accessed via remote desktop. You can also debug .NET code in a running Umbraco instance on domain-joined machines with the appropriate debugging tools installed and configured, but that is beyond the scope of this book. For this scenario, check out the advanced developer sections of the Umbraco wiki (http://our.umbraco.org/wiki).
Security Settings in a Production Environment
When installing to a production environment, you must take some additional considerations into account, and not the least of these are the security and access settings for the Umbraco site and related files (see the earlier A Note on Security sidebar in the Installing Umbraco Manually
section). In addition you will likely create a backup routine for your Umbraco instance. Including both your Umbraco database and your Umbraco files in your backup is important to have a complete snapshot. The author recommends reviewing the current backup documentation on the Umbraco wiki (http://our.umbraco.org/wiki).
Other Installation Scenarios
Of course, other scenarios exist in which you might install Umbraco, such as load balancing, cloud installation (Amazon EC2 or Microsoft Windows Azure), distributed publishing, and others. These scenarios are supported but are outside the scope of this book. For more information on them refer to the Umbraco wiki, the Umbraco forum, and Umbraco.tv for more information.
Upgrading Umbraco
The Umbraco Installation Wizard can manage patch upgrades (e.g., 4.5.1 to 4.5.2) and single major version upgrades (e.g., 4.0 to 4.5) gracefully and is the recommended approach for upgrading an installation. With all upgrades, knowing whether your installation contains any modified source or files from the original distribution is important. If so, take care to make backup copies of these files. In addition, if your installation contains a customized web.config file, or other configuration file, creating a backup of your configuration files for later use is essential.
Performing a Patch Upgrade
Typically, a patch upgrade contains no new functionality and requires no changes to configuration files. Reading the notes associated with a new Umbraco release prior to installing or upgrading an installation is good practice because any changes to configuration files will be documented in the notes.
The process to complete a patch upgrade is generally as follows:
1. Extract the patch release from the archive.
2. Copy new or altered files to your installation.
3. Run the Umbraco Upgrade Wizard (see Figure 1.21).
Figure 1.21
1.21You can always find the latest release of Umbraco at the Umbraco home on CodePlex at http://umbraco.codeplex.com/releases.
Unless specified in the release notes, you will only copy the following directories to your installation:
/app_data
/bin
/install
/umbraco
/umbraco_client
After the files are copied, open a browser and navigate to your Umbraco instance. The Umbraco Upgrade Wizard launches and guides you through the process to complete the site upgrade.
In addition, you must remove any cache files located in the /app_data/TEMP/ folder, such as those generated by the client dependency loader, the Examine Search indexer, and the Umbraco document cache.
note Unless explicitly stated in the release notes, a patch release doesn't include database changes. In this case, the upgrade wizard simply updates the current version number in web.config. Instead of running the wizard, you can simply change this version number before copying the files to prevent the wizard from running. To do so, simply change the value of the
4.5.2
/>
Verify permissions! If you skip the Upgrade Wizard, make sure to verify that you have correct file permissions for directories because the file copy process can reset them. See step 3 of the Installing Umbraco Manually
for reference.
Performing a Version Upgrade
When upgrading between single major versions, identifying all third-party components and Umbraco version-specific features is important. Breaking changes are noted in the major version's release notes and in Umbraco-provided installation and upgrade guides. Aside from verifying that third -party components are compatible with the version to which you are upgrading, creating a backup of all modified files, dependent assemblies, ASP.NET user controls, and all configuration files is essential.
The process to complete a version upgrade is generally:
1. Gather information about changes to configuration files.
2. Identify third-party components and related files.
3. Extract the version release from the archive.
4. Copy new or altered files to your installation.
5. Apply changes to configuration files.
6. Run the Umbraco Upgrade Wizard.
After the files are copied and the configuration files are updated, open a browser and navigate to your Umbraco instance. The Umbraco Upgrade Wizard launches and guides you through the process to complete the site upgrade.
note Updating your installation's configuration files to properly contain both a new version's required settings and your specific settings is tricky at best. Most users have the most success by using a file difference and merge tool to create new configuration files based on the new file and adding the settings from the older version where no conflict exists.
Some settings will need to be determined based on your specific requirements and the specific version being used for the upgrade — for example, XML schema changes from version 4.0 to version 4.5 and Umbraco user password format — set in web.config — from version 4.5.0 to version 4.5.1.
Utilizing Umbraco Starter Kits
Umbraco comes with four starter kits to help you get up and running quickly with your Umbraco installation. These include the Simple starter kit, the Blog starter kit, the Personal starter kit, and the Business starter kit. Each of these starter kits contains a collection of document types, templates, and modules that make up a simple but complete site. In addition, you can customize