I am new to Umbraco, can anyone tell me why I am seeing these 2 values instead of the expected string?
I get Umbraco.Web.Models when I use this code to get a link
var businessLink = child.Value("websiteLink");
And Umbraco.Web.PublishedModels when trying to use this code to get the name of the previous child to my current node:
var business = child.AncestorsOrSelf("Business").Last();
Any advice would be greatly appreciated.
I'm not sure what you're trying to accomplish, but for Umbraco v8, all of the following extension methods are available on
Umbraco.Core.Models.IPublishedContentso you can have strongly typed access to all of them with intellisense for both content and media. These methods returnIEnumerable<IPublishedContent>.Alternatively, you have other methods that return a single
IPublishedContent.More information can be found here: https://our.umbraco.com/documentation/Reference/Templating/Mvc/querying