Skip to content

Instantly share code, notes, and snippets.

@Silverstriper
Silverstriper / MaintenanceServicesAPIController.cs
Created March 12, 2016 21:47
MaintenanceServicesAPIController is a collection of methods used in the upgrade path of an Umbraco 6.x version site into the Umbraco 7.x realm. This code was written to move from 6.1.6 to 7.2.4, but it may be useful for someone else as reference.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Mvc;
using Umbraco.Core.Models;
using Umbraco.Web;
@Silverstriper
Silverstriper / metatags_4.7.1
Created February 2, 2012 07:05
MetaTags RAZOR sample for Umbraco 4.7.1
@{
var node = @Model.AncestorOrSelf();
var canonicalUrl = String.Empty;
if (umbraco.library.RequestServerVariables("HTTP_HOST").ToLower().StartsWith("www")) {
canonicalUrl = string.Concat("http://", umbraco.library.RequestServerVariables("HTTP_HOST"), Model.Url);
} else {
canonicalUrl = string.Concat("http://www.", umbraco.library.RequestServerVariables("HTTP_HOST"), Model.Url);
}