menu_book Navigation menu

Taxonomies

Taxonomies are used to classify and group entries together (e.g., "Blog Categories", "Product Tags").

  • The Data Model: To ensure the routing system is universally fast, Taxonomy Terms are Entries. They possess an entry_id and a translatable slug.
  • The Pivot Table: Content is linked to terms using a dedicated pivot table: term_relationships. This allows developers to perform lightning-fast SQL JOIN operations when filtering articles by multiple categories.
  • Hierarchy: Taxonomies can be flat (like Tags) or hierarchical (like Categories). Hierarchical terms utilize the parent_id column in the entries table, fully compatible with our recursive CTE (Common Table Expressions) for instant tree generation.

Automatic Archive Routing

Unlike standard pages, Taxonomies in Pragma CMS are self-contained. When you create a taxonomy (e.g., Blog Categories), the system automatically registers two specialized routes:

  • front.taxonomies.terms.index: Displays the list of all terms within that taxonomy (e.g., /blog-categories).
  • front.taxonomies.terms.show: Displays the entries associated with a specific term (e.g., /blog-categories/technology).

Source of Truth: All SEO metadata, titles, and descriptions for these archives are managed directly within the Taxonomy CRUD, ensuring no URL conflicts with the standard Pages module.