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.
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> } }
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>
}
}
is working on a reply...