PHPackages                             itmundi/linkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. itmundi/linkit

AbandonedArchivedCraft-plugin

itmundi/linkit
==============

Link fieldtype for Craft

027PHP

Since Oct 16Pushed 10y ago2 watchersCompare

[ Source](https://github.com/itmundi/LinkIt)[ Packagist](https://packagist.org/packages/itmundi/linkit)[ RSS](/packages/itmundi-linkit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Linkit plugin for Craft
=======================

[](#linkit-plugin-for-craft)

One link field to replace them all, a multi-purpose link fieldtype for Craft CMS.

This plugin adds a fieldtype which links to all sorts of stuff, Linkit can currently link to:

- Entries
- Assets
- Categories
- Emails
- Phone numbers
- Custom URLs

And it plays really nicely with Matrix!

Field settings allow you to:

- Configure what elements each field can link too.
- Set which entry/asset sources are available to each field.
- Allow fields to set custom link text.
- Allow fields to set links to open in new window.
- Set default link text.

Installation
------------

[](#installation)

To install Linkit, follow these steps:

1. Upload the linkit/ folder to your craft/plugins/ folder.
2. Go to Settings &gt; Plugins from your Craft control panel and enable the Linkit plugin.
3. Create and configure a new linkit field.

Template Usage
--------------

[](#template-usage)

Get the link object:

```
{% set yourLink = entry.yourLinkFieldHandle %}

```

Just the link - output a pre built HTML link:

```
{{ yourLink.link|raw }}

```

Build a simple custom link:

```
{{ yourLink.linkText }}

```

Build your own:

```
{% switch yourLink.type %}

    {% case "entry" %}

		{{ yourLink.entry.title }}

    {% case "category" %}

		{{ yourLink.category.title }}

    {% case "asset" %}

			{% if yourLink.asset.kind == 'image' %}

			{% else %}

			{% endif %}

    {% case "custom" %}

			 {{ yourLink.linkText }}

    {% case "email" %}

		{{ yourLink.email }}

    {% case "tel" %}

		{{ yourLink.tel }}

{% endswitch %}

```

Template Variables
------------------

[](#template-variables)

Each link returns a link object which contains the following:

```
{% set yourLink = entry.yourLinkFieldHandle %} // Get the link

{{ yourLink.type }} // Returns the link type - entry, asset, email, tel, custom

{{ yourLink.email }}  	// Email String / False
{{ yourLink.custom }} 	// Custom URL String / False
{{ yourLink.tel }}		// Telephone Number / False
{{ yourLink.entry }}	// Entry Object / False
{{ yourLink.category }}	// Category Object / False
{{ yourLink.asset }}	// Asset Object / False
// Each link type is returned - only the active type will return data the rest return false

{{ yourLink.text }} 	// The Custom Text String
{{ yourLink.target }}   // True/False (Bool) - Open in new window?

{{ yourLink.url }}		// The full url (correct prefix added eg mailto: or tel:)
{{ yourLink.linkText }} // The link text string ready to use (If no custom text is provided it generates it based on the link type)

{{ yourLink.link }}		// Full link HTML ready to use

```

Roadmap
-------

[](#roadmap)

- Force download option
- Rework the way link data is returned
- Improve handling of target stuff - if it's required
- More Validation Options

Changelog
---------

[](#changelog)

### 0.9.1

[](#091)

- Fixed: Input field not displaying correctly when set to single type when field had previously been saved.
- Fixed: Custom text returning false.

### 0.9

[](#09)

- Added: Removed the requirement to use the |raw filter when using the link variable.
- Fixed: Input field now corectly displays when on one link type is setup.

### 0.8.1

[](#081)

- Added: Hide the Link To... select when only one link type has been selected for the field.

### 0.8

[](#08)

- Added: Category Support

### 0.7

[](#07)

- Added: Default Text - Fieldtype setting to add default link text for a link.

### 0.6

[](#06)

- Fix: PHP Error when returning an entry or asset that has subsequently been deleted

### 0.5

[](#05)

- Initial beta release

Licence
-------

[](#licence)

Copyright 2014 Fruit Studios Ltd

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/473941cfd5dd7f9070a5ee2e0c7fe71ef6f9aed74e40cee91cebf77a2392bb27?d=identicon)[nerds-and-company](/maintainers/nerds-and-company)

---

Top Contributors

[![samhibberd](https://avatars.githubusercontent.com/u/1846063?v=4)](https://github.com/samhibberd "samhibberd (9 commits)")

### Embed Badge

![Health badge](/badges/itmundi-linkit/health.svg)

```
[![Health](https://phpackages.com/badges/itmundi-linkit/health.svg)](https://phpackages.com/packages/itmundi-linkit)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
