var homePage = Model.Content.AncestorOrSelf(1); var testimonials = homePage.Children.OfTypes("dtTestimonials").First(); var testimonialItems = testimonials.Children.OfTypes("dtTestimonial"); }
Now what results is a nice list of Testimonials i.e. text content, minus the logos. I can get the path to the logos, the id to the logos, and the above returns this "1107?mode=pad&rnd=130704961800000000".
I can verify that the Image Media Type contains the umbracoFile property. I am using the MediaPicker field type which is used to select an image from a media folder.
What I have noticed is that the image in the Media folder has an ID of 1107, which matches the data being returned in my image call above (at least for one of the images of course). But when I try something like;
I get an ID of 1027 returned, which matches the ID of the image being displayed on this particular Testimonial in the Admin. I assume though that this is normal.
So... what have I missed this time, any idea folks / Jeavon?
Cannot get image URLs iterating through child nodes
Well my old nemesis is back to kick my butt eh Jeavon ;)
I have 3 Testimonial items that are children under my Testimonials page.
As I did on a previous but earlier 7.x version of Umbraco I attempted to display these items on my Testimonials page using this code;
Now what results is a nice list of Testimonials i.e. text content, minus the logos. I can get the path to the logos, the id to the logos, and the above returns this "1107?mode=pad&rnd=130704961800000000".
I can verify that the Image Media Type contains the umbracoFile property. I am using the MediaPicker field type which is used to select an image from a media folder.
What I have noticed is that the image in the Media folder has an ID of 1107, which matches the data being returned in my image call above (at least for one of the images of course). But when I try something like;
I get an ID of 1027 returned, which matches the ID of the image being displayed on this particular Testimonial in the Admin. I assume though that this is normal.
So... what have I missed this time, any idea folks / Jeavon?
Hi Jeremy
Have you tried using this instead
Looking forward to hearing from you.
/Jan
Thanks Jan... sadly that doesn't work either.
I've decided to implement my solution using a media folder and tags for now... but I really want to know what's going on.
Project deadline is tonight so once that's done I'll come back to this and figure it out :)
is working on a reply...