Copied to clipboard

Flag this post as spam?

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


  • Richard Galt 64 posts 230 karma points
    Oct 10, 2014 @ 15:27
    Richard Galt
    0

    Partial view link issue with Property Converters 7.1.6

    I have a carousel partial view that renders correctly but seem to have an issue with the internal link against the description. When the link is pressed it says :

    Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent
    

    I'm using the property converter package and this is my code:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
        @using Our.Umbraco.PropertyConverters.Models
    
        @{
            var promoItems = CurrentPage.PromoRepositories.First().PromoItems.Where("Visible");
        }
    
    <!--promo slider html-->
    <div id="myCarousel" class="carousel slide"> 
        <div class="carousel-inner">
            @foreach (var item in promoItems)
            {
            <div class="@item.IsFirst("active") item">
                <div class="slide">
                    <img src="@item.GetCropUrl("image","promoHome")" alt="@item.Name" />
                    <div class="promoinfo">
                       <a href="@item.GetPropertyValue("link")" class="btn btn-primary"><h3>@item.GetPropertyValue("Description")</h3></a>
                  </div>
                </div>
            </div>
            }
        </div>
        <!-- Carousel nav -->
            <div class="carousel-control">
        <a class="carousel-control left" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
        <a class="carousel-control right" href="#myCarousel" data-slide="next"><span  class="glyphicon glyphicon-chevron-right"></span></a>
            </div>
    </div>
    <!--end promo slider html-->
    

    Thanks

    Rich

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Oct 10, 2014 @ 15:29
    Jeavon Leopold
    100

    I think you need this:

    @item.GetPropertyValue("link").Url
    

    Assuming that "link" is a content picker?

  • Richard Galt 64 posts 230 karma points
    Oct 10, 2014 @ 16:14
    Richard Galt
    0

    That's the ticket.

    Thanks Jeavon :)

  • 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