diff --git a/src/Orchard.Web/Themes/TheAdmin/Views/Layout.cshtml b/src/Orchard.Web/Themes/TheAdmin/Views/Layout.cshtml
index f14e71384..b5f60f2b6 100644
--- a/src/Orchard.Web/Themes/TheAdmin/Views/Layout.cshtml
+++ b/src/Orchard.Web/Themes/TheAdmin/Views/Layout.cshtml
@@ -1,5 +1,6 @@
@model dynamic
@using Orchard.Environment.Descriptor.Models
+@using Orchard.Localization
@using Orchard.Security;
@using Orchard.DisplayManagement.Descriptors;
@using Orchard.UI.Resources;
@@ -73,7 +74,7 @@
}
@if (Model.Content != null) {
-
+
@Zone(Model.Content)
}
diff --git a/src/Orchard/Localization/HtmlLocalizationExtensions.cs b/src/Orchard/Localization/HtmlLocalizationExtensions.cs
index cb5d6af4b..439c2f5a6 100644
--- a/src/Orchard/Localization/HtmlLocalizationExtensions.cs
+++ b/src/Orchard/Localization/HtmlLocalizationExtensions.cs
@@ -6,6 +6,16 @@ using Orchard.Mvc.Html;
namespace Orchard.Localization {
public static class HtmlLocalizationExtensions {
+ ///
+ /// The dir attribute specifies the text direction.
+ ///
+ /// Returns rtl or ltr based on if your content has an ILocalizableAspect or not.
+ ///
+ ///
Returns rtl or ltr
+ public static string Directionality(this HtmlHelper html) {
+ return html.Directionality(null);
+ }
+
///
/// The dir attribute specifies the text direction of the element's content.
///
@@ -20,7 +30,7 @@ namespace Orchard.Localization {
var workContext = html.GetWorkContext();
var culture = workContext.CurrentSite.SiteCulture;
- if (content.Has()) {
+ if (content != null && content.Has()) {
return content.As().Culture;
}