Skip to content

Instantly share code, notes, and snippets.

@kgiszewski
Created March 28, 2014 20:59
Show Gist options
  • Save kgiszewski/9842878 to your computer and use it in GitHub Desktop.
Save kgiszewski/9842878 to your computer and use it in GitHub Desktop.
v7 Umbraco UrlPicker Gist
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using UrlPicker.Umbraco.Models;
@{
Layout = "BasePage.cshtml";
var urlPicker = Model.Content.GetPropertyValue<UrlPicker>("myUrlPickerPropAlias");
}
<div>Name: @urlPicker.Name</div>
<div>SelecedUrl: @urlPicker.Url</div>
<div>New Window: @urlPicker.Meta.NewWindow</div>
<div>Title: @urlPicker.Meta.Title</div>
<div>Type: @urlPicker.Type</div>
<div>Url: @urlPicker.TypeData.Url</div>
<div>ContentId: @urlPicker.TypeData.ContentId</div>
<div>ContentName: @urlPicker.TypeData.Content.Name</div>
<div>MediaId: @urlPicker.TypeData.MediaId</div>
<div>ContentName: @urlPicker.TypeData.Media.Name</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment