Yes, sorry for not being clear enough with my ellipsis in my code sample, I am iterating with a foreach just like your code sample.
I can access and render everything in the first nested doc type using that method just fine, but not the 2nd doc type. My 2nd doc type contains images as you can see below:
I have a sneaky feeling that Nested Content and @Umbraco.Media calls (without the GetPropertyValue bit), don't play so nicely together. I've never tried it myself, but will make a note of it to look at in future.
Render from 2nd document type in Nested Content
I am unable to render anything from a 2nd document type in a NC.
Everything renders fine for the first doc type using:
How do you access the 2nd (or 3rd etc.) doc type that is a part of a NC?
Thanks for any help!
Hi Dustin,
How are you setting the
item
variable?Do you have an extended code snippet that you could share?
The
items
variable will contain a collection of the NC nodes, so should be easily looped over, like so:Thanks,
- Lee
Yes, sorry for not being clear enough with my ellipsis in my code sample, I am iterating with a foreach just like your code sample.
I can access and render everything in the first nested doc type using that method just fine, but not the 2nd doc type. My 2nd doc type contains images as you can see below:
When I attempt to render the images like above, I get an error that "Parameter 'ID' must be a string or integer". When I try rendering like...
I of course get an image placeholder.
Thanks
After a lot of digging, I figured out what I needed:
Images are rendering just fine now.
Hi Dustin,
Glad that you've got it working.
I have a sneaky feeling that Nested Content and
@Umbraco.Media
calls (without theGetPropertyValue
bit), don't play so nicely together. I've never tried it myself, but will make a note of it to look at in future.Cheers,
- Lee
is working on a reply...