Thanks can you help me with the syntax...
I tried this but getting error in VS
var image = Umbraco.TypedMedia(item.GetPropertyValue("Puffimage"));
var imageurl = Udi.Parse("image").ToPublishedContent(); it doesnt like image as a string
Many Thanks for trying to help me
I got error -cannot convert to a string.
item.GetPropertyValue("puffimage")
I want to use modelsbuilder but I only getting error.
I dont understand the concept its working on the template but if i want to use something in a view.
It complains over the last .ToPublishedContent();
udi doesn't contain a definitaion for ToPublishedContent and no extension method to ToPublishedContent accemps a first argument of type udi are you missing an assembly.
/Christina
Multinodetreepicker get Id insted of image
Hi Im using a typedMultiNodeTreePicker and I getting nr insted of image Can someone help me Many thanks /Christina
I would change the code like this:
Thanks I get null exception and that is strange /Christina
The firts image i get a number and the others i get Umbraco.Core.Udi[] /Christina
You can go from a Udi to IpublishedContent with: Udi.Parse("udi").ToPublishedContent()
Thanks can you help me with the syntax... I tried this but getting error in VS
/Christina
item.GetPropertyValue("puffimage")
returns a Udi right? If so this should work:I'm not used to using Umbraco without modelsbuilder so if this doesn't work I need to make some sort of test.
Many Thanks for trying to help me I got error -cannot convert to a string.
I want to use modelsbuilder but I only getting error. I dont understand the concept its working on the template but if i want to use something in a view.
/Christina
This is a good startingpoint for Modelsbuilder: https://24days.in/umbraco-cms/2016/getting-started-with-modelsbuilder/
What happens if you do:
Thanks for helping me
It complains over the last .ToPublishedContent(); udi doesn't contain a definitaion for ToPublishedContent and no extension method to ToPublishedContent accemps a first argument of type udi are you missing an assembly. /Christina
I'm sorry, I don't have any solution. As I said I always use modelsbuilder. Makes life a lot easier.
Thanks if i have used modelsbuilder can you give me an example it would help me a lot.
@using ContentModels = Umbraco.Web.PublishedContentModels; var typedMultiNodeTreePicker = Model.Content.Startboxes;
how to i get the puffimage? /Christina
}
Big Big Thanks for helping me out i'm so happy it works/Christina
Don't know if this does the trick:
/Bent
Thanks i tried that but it doesnt work /Christina
is working on a reply...