From 652abe383891033ec2c635ffedd900ae972d7b7f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 21 Jan 2013 15:26:56 -0100 Subject: [PATCH] Usercontrols defined in v4 didn't work as they're saved without the tilde --- src/Umbraco.Web/umbraco.presentation/macro.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs index 446599a88d..d42f8f2a60 100644 --- a/src/Umbraco.Web/umbraco.presentation/macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/macro.cs @@ -422,6 +422,11 @@ namespace umbraco try { TraceInfo("umbracoMacro","Usercontrol added (" + Model.TypeName + ")"); + + // Add tilde for v4 defined macros + if (string.IsNullOrEmpty(Model.TypeName) == false && Model.TypeName.StartsWith("~") == false) + Model.TypeName = "~/" + Model.TypeName; + macroControl = loadUserControl(ScriptType, Model, pageElements); break; }