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
This code somehow just stopped working and displaying an error message when using Replace to display a cropped image.
Any suggestion ?
@{ var newsItems = Model.NodeById(2148); var sortedItems = newsItems.Children.OrderBy("createDate descending"); var itemsPerPage = 5; foreach(var page in sortedItems.Where("visible").Take(itemsPerPage)) { <li><a href="@page.Url">@page.Name </a> </li> <li><a href="@page.Url">@Library.Truncate(@Library.StripHtml(page.newsDesc), 50)</a></li> <li> <img src="@page.Media("newThumb","umbracoFile").Replace(".jpg","_thumb.jpg")" height="150" width="224"/></li> } }
Could it be that nothing has been specified for that property for that page, meaning 'umbracoFile' could be null? Just a thought.
Hi Grant,
Thanks for the response. As i mentionedin my previous threat its really weird cos it suddenly stopped working and now working again. Did change anything though.
I have no idea what might be causing this to be honest.
//fuji
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Replace image extension with cropper
This code somehow just stopped working and displaying an error message when using Replace to display a cropped image.
Any suggestion ?
Could it be that nothing has been specified for that property for that page, meaning 'umbracoFile' could be null? Just a thought.
Hi Grant,
Thanks for the response. As i mentionedin my previous threat its really weird cos it suddenly stopped working and now working again. Did change anything though.
I have no idea what might be causing this to be honest.
//fuji
is working on a reply...