Panopoly Apps Data Model

Content Types, Users, and Other Entities

In all probability, your app will add a few new fields to existing data models or create some new entities.

Create a Namespace

All machine names should be namespaced with the title of your app. For example, all Panopoly News fields, content types and views have "panopoly_news" applied to them.

Configure content types for entity translation

Enabling entity translation for a content type

With Entity Translation enabled for "Node", you can set the translation mode (Entity Translation or Content Translation) for each Content Type. To enable translation mode for a particular content type, you need to edit the content type and click on the 'Publishing options' tab and choose under Multilingual support:

Content, the Drupal Way

Organizing content in Drupal can be very liberating — or very frustrating, depending on what methods you're used to using.

Almost all information in Drupal is stored as a 'node', the basic unit of content. By default, there is no hierarchy or structure imposed on these nodes: they do not reside in specific 'sections' of your site, and different kinds of nodes (images, blog posts, news articles, etc.) are not automatically grouped or sorted into different groups. Rather than hard-coding specific hierarchies or styles of display, Drupal treats your content as a giant soup, with each piece of content having properties like a title and an author, a 'published' flag, a publication date, and so on. Specific kinds of pages, specific sections of your site, and so on are created by pulling up any content with certain properties and listing it.

Some examples can help clarify this concept.

  1. Default front page

Poll: community voting

The Poll core module lets you create simple polls. You ask a question, provide possible answers, and let your users vote. Drupal then keeps a running tally of the results.

When you create a poll, Content >> Add content >> Poll (Drupal 5 and 6) or Content >> Add content >> Poll (Drupal 7), you can also specify the "base" vote counts (how many votes an item has at the start) and decide how long the voting will run.

Blog module (single and multi-user blogs)

The Blog module (a core module in Drupal 7 and earlier) allows authorized users to maintain a blog. Blogs are a series of posts that are time stamped and are typically viewed by date as you would view a journal. Blog entries can be made public or private to the site members, depending on which roles have access to view content.

Note that the Blog module is not needed for a "single-user" blog (a site that only has one individual blogging). For that use case, it's simpler to create a custom content type. The Blog module is usually used when there is a need for a number of blogs, written by different users, running on one site. For more information on creating a single-user blog, see this Single User Blog recipe.

The Blog module was removed from Drupal 8 core but it can still be installed and enabled as a contributed module.

Subscribe with RSS Subscribe to RSS - content type