Download the PHP package justinholtweb/craft-tidytags without Composer

On this page you can find all versions of the php package justinholtweb/craft-tidytags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-tidytags

Tidy Tags

A tag manager for Craft CMS 5 with multi-site support, cross-source duplicate detection, and optional read-only support for entry-backed tags.

Tidy Tags gives you a control panel section for auditing, cleaning, and merging tags across every site in your Craft install. It compares tags against each other and against tag-like entry sections (Teams, Competitions, Topics — anything you've entrified or that should stay aligned), shows usages inline, and watches tag fields while editors are working so they're nudged toward existing taxonomy before they create yet another England tag.

If you've entrified your tags with php craft entrify/tags, you can point Tidy Tags at the resulting channel sections and they'll show up on the dashboard, in the duplicate scanner, and in the editor "did you mean?" warning alongside native tag groups. Entry-backed sources stay read-only for destructive actions but support relation swap — see Tag-like entry sections below.

Requirements

Installation

Until this plugin is published to the Craft Plugin Store, install it as a path repository.

  1. Clone or place this repo next to your Craft project, e.g. ../craft-tidytags.
  2. In your project's composer.json, add the path repository:

  3. Install the package:

  4. In the Craft control panel, go to Settings → Plugins and install Tidy Tags.

Features

Dashboard

Navigate to Tidy Tags in the CP sidebar. The dashboard lists every source in the install with:

Click Manage on a row to open that source's list. "Sources" includes every native tag group plus any channel sections you've designated as tag-like.

Group view

The group view shows every tag in a group with per-site columns so you can see where a tag is translated and where it isn't. From here you can:

All actions are multi-site aware. Choosing "All sites" in the filter shows every tag once (keyed to the primary site) with its translations in sibling columns; choosing a specific site scopes everything to that site.

Duplicate scanner

The Duplicates tab has two scopes:

Each cluster item:

The Levenshtein threshold is configurable per-scan (default 2, range 1–6).

Differentiator and display fields

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

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

"Did you mean?" warnings for editors

Tidy Tags ships a small JS asset bundle that loads on every control panel page. When an editor starts typing a new tag into a tag field, the plugin debounces the input, asks the tidytags/tags/check-duplicate action for similar items, and shows a non-blocking amber notice below the field listing matches across:

Each match shows the differentiator value (if configured) and links directly to the existing item, so an editor about to create England in a tag field is told that England (Football) already exists as a Team and given a one-click way to open it. The warning is informational — it never blocks the editor — but it nudges people toward reusing existing taxonomy instead of duplicating.

Tag-like entry sections

Craft's php craft entrify/tags command converts a tag group into a channel section, turning each tag into an entry. Once entrified, your "tags" are regular entries with URLs, bodies, drafts, authors, and revisions.

Tidy Tags can surface these sections alongside native tag groups so the dashboard and scanners aren't suddenly empty after entrification. To opt a section in:

  1. Go to Settings → Plugins → Tidy Tags.
  2. Check each channel section you want surfaced under Tag-like sections.
  3. Save.

Entry-backed sources are read-only for destructive actions. Rename, merge, and delete are tag-only because entries carry URLs, bodies, drafts, and authorship that can't be safely mutated through a tag-sized interface — and Craft already has better UIs for editing entries. You still get:

Configuration file

The plugin settings screen is the primary place to manage tag-like sections and per-source field config. Every field on the settings model can also be driven from config/tidytags.php, which is overlaid on top of the saved settings at request time — handy for per-environment configuration:

Use section UIDs (not IDs or handles) so the config is stable across environments. You can find a section's UID in the URL of its settings page, or via php craft entries/sections. Tag-group UIDs come from php craft tags/groups or the URL of the tag group's settings page.

Permissions

Tidy Tags uses Craft's default plugin access permission: accessPlugin-tidytags. Grant it to any user group that should be able to view or manage tags through the dashboard.

How merging works

When you merge tags, Tidy Tags:

  1. Starts a database transaction.
  2. Reads every row in {{%relations}} whose targetId is one of the source tags.
  3. For each such row, checks whether a relation with the same fieldId, sourceId, and sourceSiteId already points at the target tag. If so, the source row is deleted (it would otherwise become a duplicate); if not, it's updated to point at the target.
  4. Deletes each source tag element (all sites) via Craft::$app->elements->deleteElement().
  5. Commits the transaction.

This preserves every entry's relationship to the merged tag while cleaning up redundant rows.

How swap works

Swap is the element-type-agnostic version of merge. It runs the same relation re-pointing logic (steps 1–3 above) inside a transaction but never deletes the source elements. Use it when:

After a swap, the source entries are orphaned (no relations point at them) but still present. Delete them through Craft's normal entry UI once you're satisfied.

After large merges or swaps you may want to run:

to refresh Craft's element and template caches.

Configuration

Plugin-wide settings (tag-like sections and per-source field config) live on the Settings → Plugins → Tidy Tags screen and can be overlaid from config/tidytags.php; see Configuration file above. The duplicate similarity threshold is a query parameter on the Duplicates page (?threshold=N), and the "did you mean" endpoint accepts title, groupId, and siteId parameters if you want to call it from your own code.

Action endpoints

Action Method Params
tidytags/tags/check-duplicate GET title, groupId, siteId
tidytags/tags/usages GET elementId
tidytags/tags/rename POST tagId, title, siteId
tidytags/tags/delete POST tagId or tagIds[]
tidytags/tags/merge POST targetId, sourceIds[]
tidytags/tags/swap POST targetId, sourceIds[]

All mutating endpoints require the accessPlugin-tidytags permission and a CSRF token.

License

This plugin is released under the Craft License.


All versions of craft-tidytags with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
craftcms/cms Version ^5.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package justinholtweb/craft-tidytags contains the following files

Loading the files please wait ...