https://github.com/dennisinteractive/default_content
https://github.com/dennisinteractive/default_content
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dennisinteractive/default_content
- Owner: dennisinteractive
- Created: 2017-01-31T12:21:38.000Z (over 9 years ago)
- Default Branch: dennis-8.x-1.x
- Last Pushed: 2017-03-17T16:17:03.000Z (over 9 years ago)
- Last Synced: 2025-06-24T13:54:52.780Z (about 1 year ago)
- Language: PHP
- Size: 102 KB
- Stars: 0
- Watchers: 52
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Default content
===============
A default content solution for Drupal 8
How does it work
================
Enable default content first.
Any module that requires default content can put hal+json versions of the entities inside content/{entity_type} folders.
For example see default_content_test which has
* modules/default_content_test/content
* modules/default_content_test/content/node
* modules/default_content_test/content/node/imported.json
* modules/default_content_test/content/taxonomy_term
* modules/default_content_test/content/taxonomy_term/tag.json
At the moment these files need to be hand-created or exported using the Rest, Hal and Serialization modules.
Note that the default functionality of the Hal module is to make all links point to the origin site's FDQN.
The default_content module expects these (at this stage) to be relative to http://drupal.org as there is no point in having default content that can only be re-imported on the originating site.
Note that imported.json contains a node with a term reference field that includes a reference to the term in tag.json.
The Gliph library (in 8.x core) is used to resolve the dependency graph, so in this case the term is imported first so that the reference to it is created in the node.
To do
=====
UI for easily exporting?
[](https://travis-ci.org/larowlan/default_content)