matfish/craft-ref-tags-ui

Generate Reference Tags directly from the Element Editor

1.0.1 2022-06-20 06:01 UTC

This package is auto-updated.

Last update: 2024-10-29 06:31:09 UTC


README

This package provides an advanced UI component that allows the user to generate Reference Tags directly from the element editor.

Requirements

This plugin requires Craft CMS 4.x or later.

Installation

  1. Include the package:
composer require matfish/craft-ref-tags-ui
  1. Install the plugin:
php craft plugin/install ref-tags-ui

Usage

On any Element editor page (Entry, Asset, Category, Tag) click Ctrl+Alt+R to trigger the modal:

By Default the modal will load Global Sets, as this is the most common use case.

Once all required fields have been filled in, the Reference Tag will be displayed at the bottom. Clicking on it will copy the tag to the clipboard and close the modal.

Now you can simply paste the tag in every text field on your page.

Remember that when rendering the field on the Front end you will need to use the parseRefs filter:

{{ entry.myField | parseRefs }}

Changing the default trigger

Create a config/ref-tags-ui.php file:

<?php

return  [
    'trigger'=>'Ctrl+Alt+R'
];

Set the trigger value to whatever combination you prefer. E.g:

    'trigger'=>'Ctrl+Shift+H'

License

You can try Reference Tags UI in a development environment for as long as you like. Once your site goes live, you are required to purchase a license for the plugin. License is purchasable through the Craft Plugin Store.

For more information, see Craft's Commercial Plugin Licensing.