Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Following practices for uploading files that are part of POST binary files associate with a node in this post, I can see it successfully created by visiting mysite.org/jsonapi/file/file/
I'm developing a Drupal module that adds custom entities. These entities - obviously - come with field that are defined in the code by field definitions - instance of Drupal\Core\Field\BaseFieldDefinition.
The problem that I'm facing is that I don't know where the API documentation of the core field definitions is. Typically, I have no idea how to setup a "file" field because I can't find the documentation for the settings that this field definition accept:
In Drupal we can easily manage what fields of a node type are displayed or hidden and in what format (e.g. a text can be plain or html formatted, an image can be original or scaled) within the "manage display" tab.
Now with a headless website when I want to get all nodes of a specific content type, e.g. "GET jsonapi/node/cat" Drupal will return ALL fields with missing formating. But how can I request one of the many view modes that I have defined?
I have created a content type name "Customer Distribution" to take the population of male and female from different locations.
The fields in this page are: location
male population
female population
remarks
I have a basic view set up to show a result list of an "articles" content type (listing the title linked). There are three terms in a taxonomy for three newsletters and are all tagged under one of the three, and filtered as such. The ask is to add a solr search for this content type and add a fulltext search to it.
As I'm trying to do this I found that if the view is using Content I can't add Search: Fulltext search (not available) since I would need to create the view with an Index Article index. This allows the fulltext search but I'm finding it difficult to add the filtering.