Menu

Blog

Technology tidbits

Display Umbraco Tags on Razor Templates

February 12, 2015 by Christopher Sherman

Umbraco has a built-in tag data type that allows users to easily apply a list of tags to a document. But once you’ve added a tag property to a document type, how do you display the tag list in a Razor view? I’ll show you how in three steps.

Continue reading

Navigate Between Child Documents in Umbraco

February 11, 2015 by Christopher Sherman

It’s a common convenience to allow website visitors to navigate to the next document within a category without resorting to the back button. You might utilize this design paradigm at the bottom of a blog post to encourage your visitors to read another one of your articles. Lucky for us, Umbraco has a built-in extension function for doing just this sort of thing with the Razor syntax.

Continue reading

Umbraco Contact Form with Email Notification

February 10, 2015 by Christopher Sherman

A contact form is an essential facet of many websites and a feature that Umbraco 7 does not provide, at least not for free. In this tutorial I’ll show you how to create a contact form with email notification. We’ll use the SendGrid email service to send messages.

Continue reading

XML Sitemap with Umbraco

February 9, 2015 by Christopher Sherman

A sitemap is a file informing search engines about the organization of website content, according to Google. While web crawlers typically discover most content without a sitemap, however, there are specific instances where having a sitemap can improve discoverability.

Continue reading

HTML Sitemap with Umbraco

February 6, 2015 by Christopher Sherman

HTML sitemaps provide visitors with a bird’s-eye view of a website. I use one on my 404 error page to help users assist users in finding content. In this tutorial, I’ll explain how to add a HTML sitemap to an Umbraco 7 project.

Continue reading

Razor Truncate Function for Previewing Content

February 5, 2015 by Christopher Sherman

In my tutorial on using Umbraco Partial Views with Razor, I provided sample code that made use of a Truncate function that provides a preview of text content. If you try to implement the sample code, you’ll notice the Truncate function is not available to you because it originates from a custom Razor helper. My Truncate helper fixes a bug in the UmbracoHelper.cs source that was inadvertently stripping out anchor tags. This fix was merged into the umbraco:dev-v7 branch, so it should be available in a subsequent Umbraco release.

Continue reading

Umbraco Partial Views with Razor

February 4, 2015 by Christopher Sherman

Partial Views encapsulate a piece of your view for reuse throughout your site. Using them can remove cumbersome logic from your primary templates while keeping your code DRY. Let’s start with a basic use case for partial views: getting the most recent children of a node.

Continue reading

Add Formats to Umbraco Richtext Editor

January 8, 2015 by Christopher Sherman

To add heading elements or custom styles to the Umbraco richtext editor, you’ll need to create custom formats. Creating a new format is not exactly intuitive, but if you follow these instructions it’s a breeze.

In Umbraco Back Office:

  1. Click the Settings menu item.
  2. Hover over Stylesheets.
  3. Click the ellipsis and select Create.
  4. Name your stylesheet.
  5. Click Create.

Continue reading

Umbraco Dynamic Navigation Menu

January 5, 2015 by Christopher Sherman

Content management systems like Umbraco deliver extensive website management capabilities without ever needing to touch the codebase. Choosing which pages appear in the navigation menu should be a configurable feature, so let’s implement it.

Continue reading

Query Umbraco Nodes with Different Document Types

December 30, 2014 by Christopher Sherman

Querying for child content of Umbraco document types is a straightforward process on Razor templates that inherit from UmbracoTemplatePage, but querying for content from different document types is more opaque. Displaying content from areas throughout a website is common on views such as home pages, so in this tutorial I’ll show you how you can utilize Razor and XPath to grab content from disparate document types.

Continue reading