Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

TokenLink

No security coverage Under active development 1 sites

This module allows you to create links to Drupal entities (like nodes, users, comments, and media) using simple token replacements in your text. You can customize the link's title, target, and CSS classes.

Features

## Installation
The module depends on token_filter and twig_tweak modules.

Post-Installation

After the installation, you should enable token replacement for your text format
here /admin/config/content/formats.
To customize token templates, copy them in your site theme in /templates/tokenlink folder.

## TokenLink example usage:
- Node tokens:

`[tokenlink:node:123]`

`[tokenlink:node:32:task]` - with key for template

`[tokenlink:node:32#MyTitle,_blank,Myclass active]` - with custom link title, target and class

- User entity tokens:

`[tokenlink:user:1]`

- Comment link token:

`[tokenlink:comment:1]`

## Media tokens
If media module enabled, these tokens became available:
- This token for Image type media files only, which shows image preview with thumbnail image style.
`[tokenlink:media:1:thumbnail]`

- This token for document type media files only, which shows generic image preview for media document.
`[tokenlink:media:2:document]`

- Token for Image media which open image in modal popup is
[tokenlink:media:1:modal]

## Commerce product tokens
Under the development...

Additional Requirements

Similar projects

Drupal 9–10 · not 11

Ask your assistant about TokenLink

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Dec 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.4 Stable 9–10 Aug 28, 2024
1.0.3 Stable 9–10 Aug 28, 2024
1.0.2 Stable 9–10 Dec 27, 2023
1.0.1 Stable 9–10 Dec 26, 2023
1.0.0 Stable 9–10 Dec 25, 2023
1.0.x-dev Dev 9–10 Dec 25, 2023