I am having trouble finding the correct culture in my custom label view of an unpublished node (when I create a new node).
My goal is to only show the editor only the list of nodes with a document type of SidebarTeaser under the current domain. I have two websites in my Umbraco, one english and the other german.
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var id = Model.MacroParameters["key"].ToString();
var currentNode = Umbraco.TypedContent(id);
if (currentNode != null)
{
var currentHome = currentNode.Ancestor(1).Children.First(x => x.DocumentTypeAlias == "Frontpage");
var currentCulture = currentHome.GetCulture();
if (Model.Content.AncestorOrSelf(1).GetCulture().LCID == currentCulture.LCID)
{
<div>
@currentNode.Name
</div>
}
}
}
NuPickers - Custom Labels in multi langual site
Hi,
I am having trouble finding the correct culture in my custom label view of an unpublished node (when I create a new node).
My goal is to only show the editor only the list of nodes with a document type of SidebarTeaser under the current domain. I have two websites in my Umbraco, one english and the other german.
Is there another way to find the culture?
Best regards Kim
is working on a reply...