Configuration

Tidy Tags works out of the box on a fresh install — every native tag group in the project appears on the dashboard with no configuration at all. There are a few things you may want to tune, plus a request-level knob for the duplicate scanner.

Settings screen

Go to Settings → Plugins → Tidy Tags in the control panel to manage the plugin's settings:

  • Match strategy — how Tidy Tags decides two titles are the same thing, plus the affix and qualifier token lists the strict strategy uses. This is the setting with the largest effect on what the plugin reports, and the right answer depends on your vocabulary. See Matching Strategies.
  • Tag-like sections — channel sections that should be surfaced alongside native tag groups, typically those produced by php craft entrify/tags. These sources are read-only for destructive actions but support swap. See Tag-like Entry Sections for the full story.
  • Per-source field configuration — for each source you can pick a differentiator field and a list of display fields. See below.

Settings are persisted via Craft's project config, so they ship cleanly between environments.

Differentiator and display fields

Under Settings → Plugins → Tidy Tags you can pick, per source:

  • Differentiator field — when set, two items with the same normalized title but different differentiator values are not clustered as duplicates. This is how England (Football) and England (Cricket) stay distinct from each other while a stray England tag still gets flagged against both.
  • Display fields — values appear next to each item in duplicate clusters and the editor “did you mean” warning, so reviewers can disambiguate at a glance.

When one item has a differentiator value and the other doesn't (e.g. a Tag with no field vs. a Team with sport: Football), the cluster is still shown — Tidy Tags treats “missing” as “unknown, surface for review” rather than “definitely different”.

Per-environment config file

Every setting can also be driven from config/tidytags.php, which is overlaid on top of the saved settings at request time. This is handy when you want staging to scan extra sections, or when you'd rather keep the list in version control next to the rest of your Craft config.

<?php
// config/tidytags.php
return [
    // 'fuzzy' (default) or 'strict' - see Matching Strategies.
    'matchStrategy' => 'strict',

    // Strict strategy only; omit to keep the built-in defaults.
    'affixTokens'     => ['fc', 'afc', 'cf', 'sc'],
    'qualifierTokens' => ['women', 'ladies', 'ii', 'u21'],

    'tagLikeSectionUids' => [
        'af2a1ee1-7a4b-4d9a-bc0b-6b3b5b9f3c8b', // teams
        'c4e1be83-7c18-47e3-b6aa-2b5d1b9a94d2', // competitions
    ],
    'sourceFieldConfig' => [
        'af2a1ee1-7a4b-4d9a-bc0b-6b3b5b9f3c8b' => [
            'differentiator' => 'sport',
            'display'        => ['sport', 'country'],
        ],
        'c4e1be83-7c18-47e3-b6aa-2b5d1b9a94d2' => [
            'differentiator' => 'sport',
            'display'        => ['sport'],
        ],
    ],
];

Use source UIDs (not IDs or handles) so the config stays stable across environments. Tag-group UIDs come from php craft tags/groups or the URL of the tag group's settings page; section UIDs come from php craft entries/sections or the URL of the section's settings page.

Duplicate similarity threshold

The duplicate scanner clusters elements whose Levenshtein edit distance is at or below a threshold. The default is 2. To change it, append a threshold query parameter to the Duplicates page:

/admin/tidytags/duplicates?threshold=3

Allowed values are 1 through 6. Lower values are stricter (only catch tiny typos); higher values are looser (catch larger variations).

This applies to the fuzzy strategy only. The strict strategy uses no edit distance, so the threshold has no effect there — see Matching Strategies.

“Did you mean?” endpoint

The tidytags/tags/check-duplicate action accepts the following GET parameters when you want to call it from your own code:

  • title — the in-progress tag title
  • groupId — the tag group the tag field is bound to
  • siteId — the site context for the check

The endpoint returns matches from the given tag group and every configured tag-like entry section, honoring each source's differentiator field so that a new England (Rugby) doesn't get flagged against an existing England (Football). The editor-side warning hooks Craft's Tags field and does not attach to entries fields. See Action Endpoints for the full list.

More in Control Panel & Assets

Pairs well with Tidy Tags

Small changes to the control panel that editors notice on day one. Better filters, a real media library, sidebar fields, watermarks and uploads that don't time out.