Questions tagged [directus]

Questions regarding development with directus CMS. Note: questions must be programming questions.

Directus is a free and open-source database API and 'headless' CMS. Unlike traditional CMS that encompass your entire project codebase, the decoupled approach of Directus offers an API and SDKs to connect your content to

Directus is built with

Backbone.js, Underscore, Require.js, Zend DB, Slim, Handlebars, jQuery, Moment.js, Sortable.js, Noty, and SASS.

311 questions
4
votes
2 answers

How to get users' own data from a collection?

How to get users' own data from a collection? After a successful login, /auth/login does not return user-related info except the Bearer token. So how do I request only the logged-in users' data from a collection? While using GraphQL I can filter my…
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55
4
votes
1 answer

How to create a page extension in Directus 7

I have a working Directus CMS environment and would like to include some custom pages in there as well. According to the documentation!, I "can build page modules for custom dashboards, reporting, point-of-sale systems, or anything else". The CMS is…
4
votes
2 answers

Directus api and app on same server as front-end

I'm attempting to create a small website using Directus as a back end, since it has a nice interface for managing a database. The front end will be coded in VueJS, and I'd like them both on the same site. I'm using Apache. For…
Jared
  • 143
  • 1
  • 10
4
votes
2 answers

Directus API : how to filter the results

I want to query the Directus API for changes that have happened since I last checked. This means hitting the /activity endpoint and filtering based on the datetime param, but I can't seem to get the filter parameter to work. I'm trying something…
kris
  • 11,868
  • 9
  • 88
  • 110
3
votes
1 answer

Custom layout using components

I generated a custom layout extension for directus with npm init directus-extension. This works fine and I can build a index.js, which I can install in my local directus app. But when I want to use components in my layout.vue file (in this case…
EdMadd
  • 71
  • 5
3
votes
1 answer

Using async data for seo head elements in nuxt3

I am trying to create a site using data fetched from a directus instance. Currently I have a layout component app.vue filling all seo meta tags using static default values hardcoded in that file. So in the setup I am using: useSeoMeta({ title: ()…
Felix D.
  • 4,811
  • 8
  • 38
  • 72
3
votes
0 answers

Directus | Validation for related field are not working

When we configure the validation for child data model from parent data model using validation tab and then its not working in latest version ( 9.21.2), but it was working in old version like 9.10.0 I have created two entity such as Parent and…
Ananth
  • 1,520
  • 3
  • 15
  • 28
3
votes
0 answers

Configuring the URL's slug in Nuxtjs3/Directus

I use Directx (v9) with Nuxt 3. The URLs of my test site are based on the principle of my-collection + post_id. I.e. if I create a "blog" collection in Directus, then blog posts are displayed on the site as my-site.com/blog/1 , my-site.com/blog/2…
Futuris
  • 51
  • 2
3
votes
1 answer

Send mail in custom hook in directus 9 not working

Here is my code for a custom hook that i use to expand directus 9. I want to send a mail when a specific field in the events table gets updated. For now iÄm only checking if the events table gets updated. Then through the MailService i want to send…
Lume
  • 155
  • 11
3
votes
1 answer

How to get an image from Directus?

I need to display images from directus import React, { useEffect, useState } from 'react' import { fetchArticles } from './async/fetchArticels' const FileUpload = () => { const [articles, setArticles] = useState([]) useEffect(()=>{ …
Smile_mask
  • 243
  • 2
  • 7
3
votes
1 answer

How to create Custom Interface with standard directus interfaces?

How to create a custom interface by using standard directus interfaces as a starter? an answer in discord uses directus tarball in dependencies and a custom vue.config.js , but the rest of the import statements are still wrong. Here is my custom…
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55
3
votes
0 answers

How to use directus /auth/refresh correctly?

I'm using directus to grant users access to ressources required by an SPA written in Angular. To authenticate users I created an auth service and interceptor to handle sessions and attach the "Authorization" header. Those services work fine and…
3
votes
1 answer

Is it possible to hard delete a Directus item through the API or app?

Deleting an item from a collection, which has a status field, through the UI or API results in the item being soft deleted. However, in this one particular instance, we want to remove it from the database entirely. If not possible, can it safely be…
Davey Chu
  • 2,174
  • 2
  • 14
  • 24
3
votes
0 answers

Enumeration types in Directus?

Does Directus GraphQL support Enumeration types if not can it be adapted somehow?
Cem Kaan
  • 2,086
  • 1
  • 24
  • 55
3
votes
1 answer

Directus JS SDK adds an extra slash to the API link

I wrote this code to fetch some data using the JS SDK (a third-party library) : directus.items('configuration').read({ single: true }); This will generate a get query to /items/configuration/?single=true which returns an 404 Not…
Zied Hf
  • 491
  • 3
  • 10
  • 30
1
2
3
20 21