Giter Club home page Giter Club logo

default_content's Introduction

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?

default_content's People

Contributors

berdir avatar larowlan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.