Skip to content

idontbyte/Umbraco-Link-Picker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

#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

  1. Download and install the package from our.umbraco: our.umbraco.org/projects/backoffice-extensions/link-picker
  2. Create a new DataType in the Developer tab in your Umbraco project, referencing "Link Picker" (alias: "Gibe.LinkPicker")
  3. Add the new DataType to your Document Types to use the Link Picker

###Install using NuGet

  1. 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

Screenshot 1

Step 2: In the Umbraco side menu, choose either an internal or external link

Screenshot 2

Step 3a: Set the options for external links (URL, title, etc.)

Screenshot 3a

Step 3b: Or, set the options for internal links

Screenshot 3b

Step 4: View or remove the link

Screenshot 4

##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.

About

Link picker property editor for Umbraco 7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 50.9%
  • HTML 28.4%
  • C# 18.0%
  • CSS 2.7%