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 must be missing something obvious, but GetCropUrl works:
@{ var imageNode = Model.Content.GetPropertyValue<IPublishedContent>("slideImage"); string imgUrl = imageNode.GetCropUrl("blog post"); } <img src="@imgUrl" alt=""> <a class="overlay-link popup-img" href="@imgUrl"><i class="fa fa-search-plus"></i></a> @Model.Content.GetPropertyValue("slideContent")
And then in another view, it doesn't
@foreach (var solution in CurrentPage.Children()) { var imageNode = solution.GetPropertyValue<IPublishedContent>("bannerImage"); string imgUrl = imageNode.GetCropUrl("blog post"); }
I don't 'get' it... maybe someone can shed some light?
Hi Siko
Try this code:
@foreach (var solution in Model.Content.Children()) { var imageNode = solution.GetPropertyValue<IPublishedContent>("bannerImage"); string imgUrl = imageNode.GetCropUrl("blog post"); }
The problem in your code is that "CurrentPage" is dynamic type in this line:
@foreach (var solution in CurrentPage.Children())
Thanks,
Alex
Thanks. I found it and yes, you are right!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
.GetCropUrl works, and then it doesnt
Hello,
I must be missing something obvious, but GetCropUrl works:
And then in another view, it doesn't
I don't 'get' it... maybe someone can shed some light?
Hi Siko
Try this code:
The problem in your code is that "CurrentPage" is dynamic type in this line:
Thanks,
Alex
Thanks. I found it and yes, you are right!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.