Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Keith Hubbard 174 posts 402 karma points
    Jan 04, 2012 @ 18:46
    Keith Hubbard
    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>

  • Markus Johansson 1701 posts 4879 karma points c-trib
    Jan 05, 2012 @ 05:45
    Markus Johansson
    0

    Hi!

    Not 100% sure but did you try url with a capital U? .Url?

  • Keith Hubbard 174 posts 402 karma points
    Jan 05, 2012 @ 07:01
    Keith Hubbard
    0

    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. 

  • 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.

Please Sign in or register to post replies