Copied to clipboard

Flag this post as spam?

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


  • Maria 34 posts 128 karma points
    Jun 26, 2013 @ 13:24
    Maria
    0

    Problem with newwindow in UrlPicker

    I'm trying to use uComponents UrlPicker and the Url part actually works perfectly fine. But when I add the if statement to check for new-window I end up with macro error. The picker is set to XML. I tried all kinds of variations of N(n)ewW(w)indow but that doesn't seem to make any difference. 

    I also tried the solutions suggested here: http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/22766-Retrieve-URL-Picker-data-in-Razor but they don't work.

    And when I try to use this uComponents.Core.DataTypes.UrlPicker.Dto.UrlPickerState.Deserialize(source.UrlPicker); I get the information that DataTypes don't exist.

    Below the relevan part of my script:

    @foreach (var childPage in users)
    {
    if(@childPage.UserLink.newwindow == "True")
    {
    <li><a href="@childPage.userLink.Url" target="_blank"><img src="@CropUp.GetUrl(@img, new ImageSizeArguments{CropAlias = "usersliderimg"})"></a></li>
    }
    else
    {
    <li><a href="@childPage.userLink.Url"><img src="@CropUp.GetUrl(@img, new ImageSizeArguments{CropAlias = "usersliderimg"})"></a></li>
    }
    }

Please Sign in or register to post replies

Write your reply to:

Draft