Sebastian Dammark
04/23/2024, 6:00 AM_helper.ContentAtRoot().FirstOrDefault()
, is there anything I should be aware of between the 2 versions, or the fact that one of the sites is multilingual ?
My problem is that on the U10 site the code above works fine, but on the U13 site the code returns a null
Here is a little context, where rootNode
is null
on my U13 site.
if (!_umbracoHelperAccessor.TryGetUmbracoHelper(out var _helper)) {
return this.Problem("unable to getting the helper content");
}
var rootNode = _helper.ContentAtRoot().FirstOrDefault();
https://cdn.discordapp.com/attachments/1232209353055146008/1232209353377845308/image.png?ex=66289fe3&is=66274e63&hm=de8c8dca3a689795302581bce870264a865e91e5d9d8a3294752dc25457431bd&A hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by