Amended cshtml files to reference user uploaded image
Hi guys,
I hope you can help me. I am currently incporating the uBlogsy platform into a website that encompasses standard Umbraco pages along with a Foum and the blog platform, but I need some assistance with referencing user uploaded images within the uBlogsyHomeShowPost.cshtml file.
I have amended the showlists file so that key articles will appear on the home page and along with that I have also amended the Blog Post template and document types to include an image that will be used both within the post itself and as a teaser image on the home page.
I have been able to easily resolve the style and placement issues of all the requried text but I cannot see how to reference the image (alias of featuredImage) within the cshtml file.
Amended cshtml files to reference user uploaded image
Hi guys,
I hope you can help me. I am currently incporating the uBlogsy platform into a website that encompasses standard Umbraco pages along with a Foum and the blog platform, but I need some assistance with referencing user uploaded images within the uBlogsyHomeShowPost.cshtml file.
I have amended the showlists file so that key articles will appear on the home page and along with that I have also amended the Blog Post template and document types to include an image that will be used both within the post itself and as a teaser image on the home page.
I have been able to easily resolve the style and placement issues of all the requried text but I cannot see how to reference the image (alias of featuredImage) within the cshtml file.
Any thoughts guys!!??
I assume the image appears in the umbraco media library:
var id = theNodeYouAreRendering.GetPropertyValue("featuredImage");
var m = new Media(id);
now in your img markup youneed src="m.Url"
is working on a reply...