Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello.
I use DAMP on my blog. I'd like for the blog home page to show the associated pictures in the summary.
However I can't seem to get the syntax right and after a day of searching have given up.
Its nice and easy I don't want cropping just the path to the image so that I can show an image.
I can't find a method that works.
On my blog page I have a foreach statement that gets the child objects as expected:
nodes = ((IEnumerable<DynamicNode>)posts).Take(count).Skip(0); <ul> @foreach (DynamicNode n in nodes) { <li> <h1> <a href="@n.Url" title="@n.GetProperty("ContentTitle").Value"> @n.GetProperty("ContentTitle").Value</a> </h1> <p>@Library.Truncate(@n.GetProperty("ContentSummary").Value, 500) </p> </li> } </ul>
I want to be able to pick up the image called ContentImage also on that page. Each blog has a DAMP image file associated (ContentImage).
It seems the method I use pickup the single image in the post:
dynamic media = Model.MediaById(Model.uBlogsyContentImage); <img src="@media.umbracoFile" alt="@media.nodeName" class="blogImage" />
Can't be used as MediaByID only returns a single value.
So my question is this:
How can I pickup each photo for each blog entry
Any help (or pointers) would be gratefully received.
Thank you.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Show DAMP Src path to media for all child items
Hello.
I use DAMP on my blog. I'd like for the blog home page to show the associated pictures in the summary.
However I can't seem to get the syntax right and after a day of searching have given up.
Its nice and easy I don't want cropping just the path to the image so that I can show an image.
I can't find a method that works.
On my blog page I have a foreach statement that gets the child objects as expected:
I want to be able to pick up the image called ContentImage also on that page. Each blog has a DAMP image file associated (ContentImage).
It seems the method I use pickup the single image in the post:
Can't be used as MediaByID only returns a single value.
So my question is this:
How can I pickup each photo for each blog entry
Any help (or pointers) would be gratefully received.
Thank you.
is working on a reply...