Post

Microcontent Cheatsheet

Overview

  • Microcontent is a module
  • Microcontent is the blueprint for reusable content
  • Reference peices of microcontent from paragraphs module
  • When working with microcontent and paragraphs - create the microcontent first and then the paragraph block to reference it.

Tips

  • sometimes its best to set the paragraphs to locate the microcontent via checkboxes rather then autocomplete as the user may not know what options are available

Trouble Shooting

Paragraphs not finding the microcontent?

  • ensure the label is not disabled or hidden in the field display settings. by default the reference field locats content via the label

Display

  • Configure the display of microcontent in the admin by disabling fields in the manage display

Frontend

By default the microcontent you reference display as links to the content. This is not useful. What we need is the full content to display.

install entity reference display module

Display the full block content

  • Go to structure / content types
  • Select your paragraph type
  • Go to manage fields
  • Add field of display mode
  • Create a display mode
  • Hit save on the following screen

Set the display option

On the following edit field screen, under excluded display modes

  • Choose full
  • Choose include selected display modes
  • Save settings

Set the entity reference field display mode

Go back to manage fields (use the breadcrumbs at the top of the screen)

  • Under manage display
  • Locate the entity reference field
  • Under the format column choose selected display mode
  • Hit save

Now back on the frontend, rather then the block displaying a link to edit its content it will display the full content

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.