Pulling image url from a Block List into a Parent page
Hi,
I have another issue hopefully somebody could help with.
I have a parent hub page called Solutions which shows preview tiles of the child pages which brings in page title, url and the hero image, the code of the page is below. The child pages uses a block list to render and sort the content see image. I want to pull through the image url of the Page Hero Banner from the Child Block list pages into the Solutions parent page how can I achieve this? Any help is much appreciated as always. Despite a few set backs I am enjoying my Umbraco journey :-)
Pulling image url from a Block List into a Parent page
Hi,
I have another issue hopefully somebody could help with.
I have a parent hub page called Solutions which shows preview tiles of the child pages which brings in page title, url and the hero image, the code of the page is below. The child pages uses a block list to render and sort the content see image. I want to pull through the image url of the Page Hero Banner from the Child Block list pages into the Solutions parent page how can I achieve this? Any help is much appreciated as always. Despite a few set backs I am enjoying my Umbraco journey :-)
You can get the image from the blocklist using this line of code:
Where BlockHeaderImage is the name of the class of the Page Banner Hero block.
And BlockListProperty is the name of the "Content" blocklist property on your child page Doctype.
And ImageProperty is the name of the image property on the Page Banner Hero block.
Many thanks Yari,
I couldn't get the above to work, but I did use it as a basic structure and finally mad eit to work with the following:
Thanks gain for the tip
is working on a reply...