#Umbraco Link Picker
A simple internal or external link picker property editor for Umbraco 7.x
##Quick links
##About the package
This package is for Umbraco 7.x (Belle).
Features:
- Integrates with Umbraco linkPicker (for internal or external link selection)
- Uses Umbraco linkPicker to define the selected node ID, name, URL and target (for internal links) and name, URL and target (for external links)
##Installation
###Install using package
- Download and install the package from our.umbraco: our.umbraco.org/projects/backoffice-extensions/link-picker
- Create a new DataType in the Developer tab in your Umbraco project, referencing "Link Picker" (alias: "Gibe.LinkPicker")
- Add the new DataType to your Document Types to use the Link Picker
###Install using NuGet
- Install the package using NuGet (coming soon)
##Usage
The Link Picker returns JSON like the following example:
{ id: 1039, name: "Node Name", url: "/node-url", target: "_blank", hashtarget: "" }
If you are using dynamic, you can access the JSON data like this:
// return url @CurrentPage.propertyName.url // return name @CurrentPage.propertyName.name
If you are using strongly-typed, or want to deserialize the JSON, then use Newtonsoft.Json
to access the data using a model:
var data = JsonConvert.DeserializeObject(value.ToString()); public class LinkPickerModel { public int Id { get; set; } public string Name { get; set; } public string Url { get; set; } public string Target { get; set; } public string Hashtarget { get; set; } }
##Screenshots
Step 1: Click the "Choose" link
Step 2: In the Umbraco side menu, choose either an internal or external link
Step 3a: Set the options for external links (URL, title, etc.)
Step 3b: Or, set the options for internal links
Step 4: View or remove the link
##License
The Umbraco Link Picker is created by Karl Tynan for Gibe Digital under the MIT License: opensource.org/licenses/MIT
##Get involved!
This project is open for collaboration, so please help improve this project.