Learn more about our native MCP
Directus Logo
  • Use Cases and Features
    • Headless CMS
      Manage and deliver content with ease
    • Backend-as-a-Service
      Build and ship applications faster
    • Headless Commerce
      A single source of truth for products
    • 100+ More Use Cases
      Build anything (or everything)
    • Instant APIs
      Connect a database, get REST + GraphQL APIs
    • Granular Policy-Based Auth
      Provide secure, autonomous data access
    • Visual Automation Builder
      Automate content and data workflows with ease
    • 50+ More Features
      Get everything you need out-of-the-box
    Project Showcase
    Built With Directus

    Built With Directus

    See what everyone's been building with Directus

  • Learn More
    • Blog
      Read our latest articles and guides
    • Case Studies
      Case studies and success stories
    • Community Forum
      Questions and conversations
    • Agency Directory
      Browse our list of agency partners
    • About Us
      Learn more about Directus and the team
    • Wall of Love
      See what others are saying about us
    • Contact
      Have a general inquiry or question for us?
    • Support
      Reach out to Directus support
    Watch Directus TV
    Directus TV
    Video

    Directus TV

    Go down the rabbit hole with hours of original video content from our team.

  • Developers
  • Enterprise
  • Pricing
Book a DemoGet StartedLog In
GitHub logo34,764
Directus Marketplace
Marketplace
  1. Extensions
  2. Integrations
  3. Templates
Back to Extensions
bundle

Related Items Bundle

Show all related items across selected collections.

Related Items Bundle

Find all collections, fields or items related to a collection even if it doesn't include the reverse fields from the supported relationships: Many to One (m2o), One to Many (o2m), Many to Many (m2m) or Many to Any (m2a).

Related Items Bundle

You can include system collections such as Users and Files and benefit from seeing all the relations to other collections. For example, when viewing a file in the File Library, you will see what collections and items reference the file and know what will be impacted if it is edited or deleted.

Usage

Once installed and configured, visit an item for an included collection and scroll to the bottom of the page. By default, all related items are returned with pagination over 10 records. Use the collection filters at the top to easily see the related items in that collection.

Click on an item to open the draw for more information or make changes to that item. However, some system tables are not supported.

Requirements

  • Directus 11.1.2+
  • Admin user to initialize module

Installation

Refer to the Official Guide for details on installing the extension from the Marketplace or manually.

How to configure this module

  1. Using an Admin user, go to the project settings /admin/settings/project and scroll to the bottom
  2. Click on the field labelled "Related Items Collections"
  3. Tick the collections to include from the dropdown field
  4. Save changes

When opening the project settings for the first time, the module will automatically add the new system field at the bottom of the page. Any selection of the collections will create a new alias field within that collection's Data model. The new interface can be repositioned or customized but any changes to these fields will be lost if you choose to exclude the collection in future. Admin permissions are required during these steps.

Permissions

This extension uses the current user's policy/role permissions and will only show the permitted data. Please refer to your Access Policies to ensure your users have required access.

API Reference

This bundle contains an endpoint extension. The data can be queried using the following endpoint:

GET /related-items/<collection>/<item_id>

The response will be an array of related collections and for each one, a secondary array of any related items from that collection. For example:

{
  "collection": "directus_files",
  "fields": [
    "directus_files_id.id",
    "directus_files_id.title",
    "directus_files_id.type"
  ],
  "relation": "m2m",
  "translations": null,
  "field": "article_id",
  "junction_field": "directus_files_id",
  "primary_key": "id",
  "template": "{{ title }}",
  "items": [
    {
      "directus_files_id": {
        "id": "x0x1234x-5xx6-7890-x123-xxx4xx56789x",
        "title": "Annual Leave Policy",
        "type": "image/jpeg"
      }
    },
    {
      "directus_files_id": {
        "id": "x9x8765x-5xx6-7890-x123-xxx4xx56789x",
        "title": "Brand Guidelines",
        "type": "image/png"
      }
    }
  ]
}

Note: The fields and primary key can be used as context when processing the items or rendering an output.

@directus-labs/related-items-bundle

npm i @directus-labs/related-items-bundle

This extension is not sandboxed and can only be installed in self-hosted instances using npm. Learn more .

Alex Gaillard
Alex Gaillard
Verified
1.0.0
Works with v11.1.2+
Updated 8 months ago
MIT License
511.6 KiB (4 files)
npm
  • Directus LogoDirectus Logo

    A composable backend to build your Headless CMS, BaaS, and more. 

  • Solutions
    • Headless CMS
    • Backend-as-a-Service
    • Product Information
    • 100+ Things to Build
  • Resources
    • Documentation
    • Guides
    • Community
    • Release Notes
  • Support
    • Issue Tracker
    • Feature Requests
    • Community Chat
    • Cloud Dashboard
  • Organization
    • About
    • Careers
    • Brand Assets
    • Contact
©2026 Monospace Inc
  • Cloud Policies
  • License
  • Terms
  • Privacy