Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello, i have a question about getting the cultured homenode in umbraco 8 in the controller.
I have a homenode with different languages, example /it,/es, /sv.
And i want to get the root node of these. and when im getting it with my code i only get the english version.
anyone have any clue ?
here is my code
private List<IPublishedContent> GetProductsToFilter()
var home = Umbraco.ContentAtRoot().First();
if (home == null)
var homeChildren = home.Children;
var mainProductsPage = homeChildren?.Where(p => p.ContentType.Alias == "products").FirstOrDefault();
if (mainProductsPage == null)
List<IPublishedContent> umbracoProducts = new List<IPublishedContent>();
foreach (var products in mainProductsPage.Children)
// 1. We take 'products' with
// 2. children of type 'filter'
// 3. where is only one 'filter' child
var productFilter = products.Children;
if (productFilter == null)
if (productFilter.Count() == 1 &&
I guess what you can change Thread culture?
Try this code for getting home node:
var home = Umbraco.AssignedContentItem.AncestorOrSelf(1);
How did you make a multicultural solution with Umbraco 8?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted