Stories app

This page describes how to use the Stories app, an example of a custom content editor that authors can use to quickly create and publish flexible content in Magnolia.

Use the Stories app to create and edit stories on a Magnolia author instance. Complete the structured outline to give the story a set of key static properties. Then, build up the unstructured body of your story using content blocks you want: images, texts, videos and links. You can save and publish in one click to get your content on your website fast.

Compared to pages, stories are ideal for quickly producing free-form content without any page-hierarchy constraints. Stories, with a clear distinction between formatting and content, can then be published to different destinations: from a web page to a mobile app or as an article for an online newspaper.

Stories app is a feature available only in DX Core.

The app doesn’t yet support multi-language content.

Stories

You create stories in the Stories app.

Stories app tile in App launcher

You can organize your stories by adding folders. To add a new story, click Add story.

Story browser

Demo stories

If you have the Magnolia demo modules installed, the Stories app contains some sample blogposts to show what you can do with the Stories app. Without the demo modules, the Stories app does not contain any content by default.

In the demo, the Stories app has been decorated (/travel-demo-stories-app/decorations/stories-app/apps/stories.yaml) to extend the default functionality described on this page. The customization of the Stories app mainly introduces two new blocks, date and tour.

Outline

When you create a new story, it provides the title and lead text fields as well as several collapsible multi-field sections where you can fill in some key properties.

image

By default, the outline consists of the following fields and collapsible sections:

  • Title* - The title of the story.

  • Lead text* - The lead text for the story.

  • Lead visual - Collapsible section where you can select the Embed, Image or Video visual option:

    • For the Embed option, you can embed HTML code and add an asset as an Alternate image.

    • For the Image option, you can select an asset from the Assets chooser dialog and add Alt text.

    • For the Video option, you can select a video asset from the Assets chooser dialog and add another asset as an Alternate image.

    • In all cases, you can add a Caption and Credits.

  • Author - Collapsible section where you can add:

    • Author name

    • Author profile image with Assets chooser.

    • Author short bio - A text field with a maximum of 300 characters.

    • Author lives in - For the location of the author.

  • Related content - Collapsible section where you can add a list of related stories.

  • Dates & URL - Collapsible section where you can add:

    • Story created on*

    • Story updated on

    • URL slug - Used as the name of the story and in the URL. If you leave this field empty, the URL slug is automatically generated from the story’s Title when you first save the story.

Mandatory fields are indicated by an asterisk.

Blocks

Once you have completed the outline, you can add, reorder and delete content blocks to suit your requirements.

See the shortcuts below to work even faster.

Magnolia provides the following block types out-of-the-box:

  • Text

  • Image

  • Video

  • Content from another website

The following two are provided by the Travel Demo:

  • Date

  • Tour

To add blocks to your story, click the plus icon in your story to expand the Block chooser menu and select the block type you want.

image

The … Others option at the bottom of the menu opens the Block chooser dialog.

The types of block available may vary depending on what your development team has configured.

To delete a block, click the trash icon to the right of the block or use the backspace shortcut.

Text blocks

Add text blocks to write paragraphs or headings. Each paragraph or heading must be a separate text block. To enter a line break within a block, press Shift+Enter. If you press Enter while typing, a new text block is created at the cursor position.

You can format the text and insert or remove links to external content or to Magnolia items using the formatting bar displayed when you are editing a text block.

image

If you apply a header style to text in a block, the entire block becomes a heading.

If you paste text from another source into a text block, all formatting is removed. If you paste several paragraphs at the same time, multiple corresponding blocks are created.

When you are typing in a text block, press Enter to add a new text box.

If you insert links in a text block:

  • Use the image external link icon to link to external URLs or emails.

  • Use the image internal link icon to link to content in another Magnolia app. By default, you can link to content in the Assets and Pages apps from the Stories app.

The list of apps with content you can link to may vary depending on what your development team has configured.

Image blocks and video blocks

Add image or video blocks to select an existing asset or upload a new one.

Click browse to open the Assets chooser dialog and select an asset for your story or upload a new one. You can also add image-related or video-related metadata.

Blocks for content from another website

Use the Embedded content block to embed content from another external website. This block type uses link unfurling: it scans the URL you enter for metadata and provides a preview in the story. For example, this YouTube link displays a thumbnail preview, title and lead text:

Embedded content block

The preview displayed for external links depends on the metadata the site owner embedded in their web page header.

Publishing stories

When you have finished writing your story, you can directly click Save and publish at the bottom of the story. Alternatively, you can select a story in the workbench and click Publish. The publication process and statuses are explained here.

You must publish any assets you use in your stories separately.

The Stories app does not provide any default page or component templates to render the stories. The templates to render the stories must be configured by your development team.

You can see an example of published stories in the Magnolia demo.

Shortcuts

The Stories app supports a few keyboard shortcuts to speed up content editing.

Selecting blocks and entering the edit mode

Use the Tab key to select the next block and, after pressing the key again, to enter the edit mode in the selected block.

The Esc key functions as a toggle key for block select and block edit modes.

Moving blocks

When a block is selected, you can use Alt-J and Alt-K to move the block.

Editing in text blocks

Action Shortcut

Create new text block at the position of the cursor in a non-empty text block.

Enter

Delete the current block and merge the text to the right of the cursor with the text in the preceding block.

Backspace

Related topics
Feedback