My first content app

This tutorial guides you through the process of creating a content app in Magnolia. The app you create is called the Bookshelf app and you create it as a Magnolia light module from a custom content type definition.


Tutorial overview

The tutorial consists of three parts:

Going through the tutorial you learn:

  • How to define content types and use them to quickly create a Content app.

    A Content app is a specialized app type for managing structured content. The content app user interface consists of a browser subapp and one or more detail subapps. Content apps make it easy to enter items such as products or events. Many native Magnolia apps such as Tours and Contacts are content apps. Because this app style is used often, the framework provides convenience classes to make building a content app faster.

  • The basics of configuring fields and setting field validators.

  • How to override configuration properties.

  • How to make the elements of the app’s UI ready for internationalization.

If you want to skip the tutorial and install the final app immediately, clone the repository containing the ready-made Bookshelf app as a light module directly into your Magnolia light module folder with the command:

git clone -b master --single-branch https://bitbucket.org/magnolia-cms/bookshelf.git

Bookshelf app use case

The Bookshelf app you create in this tutorial is an example of a content app. It is a simple book catalog allowing the user to store basic bibliographic data about each book such as its title, the names of the author(s), the publisher’s name, or the ISBN-13 number. The app also allows you to group selected book items into folders called shelves in the app.

The subapps in the Bookshelf app

The Bookshelf app contains subapps:

Book Browser

In the Book Browser subapp, you can:

  • Browse the book catalog.

  • Add, rename and delete books.

  • Add, rename and delete shelves (folders for organizing books).

Book Detail

The Book Detail subapp is a place where you can create and edit a book’s bibliographic properties using text fields and a checkbox field.

Book properties

For each book item, the Bookshelf app can store and retrieve the following content properties:

  • Short cataloging name (a required content property).

  • Full book title.

  • Author(s)' name(s).

  • Whether the author(s) role is editorial or not.

  • Book description.

  • Publisher’s name.

  • Book publication date.

  • ISBN-13 number.

Bookshelf app and Magnolia content types

The Bookshelf app is based on Magnolia content types.

The books workspace

Magnolia stores content in the magnolia repository, a JCR repository that is divided into workspaces. The Bookshelf app stores all books in a new workspace called books.

Custom lib:book node type

In the books workspace, each book is a custom lib:book node type defined specifically for this tutorial.


Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules