This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using Umbraco.Core.Models; | |
using Umbraco.Web; | |
namespace My.Website.ExtensionMethods { | |
public static class UmbracoExtensions { | |
public static TPropertyValue GetPropertyValueRecursively<TPropertyValue>(this IPublishedContent content, string alias, Expression<Func<TPropertyValue, bool>> recursiveValueIsValidExpression, TPropertyValue defaultValue = default(TPropertyValue)) { | |
if (content.HasProperty(alias)) { | |
var value = content.GetPropertyValue<TPropertyValue>(alias); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using My.Website.ExtensionMethods; | |
using Umbraco.Core; | |
using Umbraco.Core.Persistence; | |
namespace My.Website.Events { | |
public class CustomDatabaseEvents : ApplicationEventHandler { | |
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { | |
ApplyUmbracoDatabaseHotfixForLongArchetypeModels(applicationContext.DatabaseContext.Database); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<table align="center" cellpadding="10"> | |
<tbody> | |
<tr bgcolor="BLACK"> | |
<td> | |
<!-- IMAGE BEGINS HERE --> | |
<font size="-3"> | |
<pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ContactDetailsGroupBuilderTemplate = {}; | |
ContactDetailsGroupBuilderTemplate.Helpers = {}; | |
ContactDetailsGroupBuilderTemplate.Helpers.getNumberOfEnabledFieldsets = function (fieldsets) { | |
return fieldsets.filter(function (v) { | |
return v.disabled === false; | |
}).length; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Our.Umbraco.Ditto; | |
using Umbraco.Core.Models; | |
namespace My.Website.ViewModels { | |
public class BasicPageViewModel { | |
public BasicPageViewModel(IPublishedContent content) { | |
Seo = content.As<SeoViewModel>(); | |
} | |
[DittoIgnore] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using Our.Umbraco.Ditto.Resolvers.Grid.Attributes; | |
namespace My.Website.ViewModels { | |
public class HomeViewModel { | |
[GridResolver(framework: "fanoe")] | |
public MvcHtmlString Content { get; set; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RebuildMediaCacheTool.ascx.cs" Inherits="My.Website.Dashboard.RebuildMediaCacheTool" %> | |
<div class="dashboardWrapper"> | |
<h2>Rebuild Media Cache</h2> | |
<img src="/umbraco_client/Dashboards/ExamineManagementIco.png" alt="" class="dashboardIcon" /> | |
<asp:MultiView ID="MainView" runat="server"> | |
<asp:View ID="InitialView" runat="server"> | |
<asp:Button ID="RebuildButton" Text="Rebuild Media Cache" runat="server"/> | |
</asp:View> | |
<asp:View ID="CompleteView" runat="server"> | |
<p>Rebuild complete!</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Globalization; | |
using Umbraco.Core; | |
using Umbraco.Core.Models; | |
namespace My.Website.ComponentModel.TypeConverters | |
{ | |
public abstract class MultipleIPublishedContentTypeConverterBase<T> : TypeConverter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using Our.Umbraco.Ditto; | |
using Umbraco.Core.Models; | |
namespace My.Website.ComponentModel | |
{ | |
public class SinglePublishedContentUmbracoPropertyAttribute : UmbracoPropertyAttribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Umbraco.Core.Models; | |
using Umbraco.Web.Mvc; | |
using Umbraco.Web.WebApi; | |
namespace UmbracoDemo.Controllers | |
{ | |
[PluginController("JsonDropDownList")] | |
public class JsonDropDownListApiController : UmbracoApiController |
OlderNewer