umbraco.MacroEngines.DynamicXml' does not contain a definition for 'url
I am currently wanting to us the carousel from Cultiv Example project and i am getting the error
Error loading Razor Script ~/macroscripts/homecarousel.cshtml 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'url'
I have reviewed the razor forum and have tried most of the reccomendations with no luck.
<section id="gallery"> <div class="pics"> @if (Model.HasValue("carouselImages")) { dynamic mediaItems = Model.CarouselImages.mediaItem; if (mediaItems.Count() != 0) { foreach (var item in mediaItems) { var image = item.Image; @* If the type of the mediacropper is not XML (but a string) then there are no crops defined, so I should not try to find the crops. *@ var crops = image.crops; if (crops.GetType().ToString() != "System.String") { <img src="@crops.Find("@name", "Homepage").url" alt="@image.nodeName" width="@image.umbracoWidth" height="@image.umbracoHeight"/><br /> } } } } </div> <a href="#" id="prev"></a> <a href="#" id="next"></a> </section>
I wish it was that simple. I have located that t has to do with the crops themselves. If i use crops i have done in version 4.7.0 and instead of 4.7.1 then it works but any new sizes do not since the upgrade. I also hade the package image cropper installed in 4.7.0.
umbraco.MacroEngines.DynamicXml' does not contain a definition for 'url
I am currently wanting to us the carousel from Cultiv Example project and i am getting the error
Error loading Razor Script ~/macroscripts/homecarousel.cshtml
'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'url'
I have reviewed the razor forum and have tried most of the reccomendations with no luck.
<section id="gallery">
<div class="pics">
@if (Model.HasValue("carouselImages")) {
dynamic mediaItems = Model.CarouselImages.mediaItem;
if (mediaItems.Count() != 0)
{
foreach (var item in mediaItems)
{
var image = item.Image;
@*
If the type of the mediacropper is not XML (but a string) then there
are no crops defined, so I should not try to find the crops.
*@
var crops = image.crops;
if (crops.GetType().ToString() != "System.String")
{
<img src="@crops.Find("@name", "Homepage").url" alt="@image.nodeName" width="@image.umbracoWidth" height="@image.umbracoHeight"/><br />
}
}
}
}
</div>
<a href="#" id="prev"></a>
<a href="#" id="next"></a>
</section>
Hi!
Not 100% sure but did you try url with a capital U? .Url?
I wish it was that simple. I have located that t has to do with the crops themselves. If i use crops i have done in version 4.7.0 and instead of 4.7.1 then it works but any new sizes do not since the upgrade. I also hade the package image cropper installed in 4.7.0.
is working on a reply...