Previewing your content is an important part of the editorial process. The WYSIWYG editor provides a good preview of how your main body content will look - and the other tools will cover the rest.
The Sector Starter Kit doesn't come with a preconfigured moderated content workflow - yet. This article assumes that you are working on a Sector site without Drupal workflow and moderation.
In this guide
- How do I know if content is published or unpublished?
- Content preview for new content
- Content preview for already published content
- The Drupal preview feature
- Limitations of Drupal preview
What you can and can't preview depends on if you are creating new content, or if you want to make changes to already published content on a LIVE site.
We have added a few markers to highlight unpublished content. On the node view ( 1 ), a bright bar ( 2 ) highlights that a node is unpublished. Bright dotted lines ( 3 ) outline related elements - menu items and teasers for an unpublished node.
New content remains in draft until you save it as 'published' - you can continue to work on it and save your changes without them being publicly accessible. The WYSIWYG editor provides a good preview for your main body content, and for other content elements - like related content or menu items - you can use the node view ( 1 ).
Tip - Hide the AdminUI for a better content preview
To hide AdminUI overlays from the frontend view, use the ‘Hide menu’ button on the right side of the toolbar - or open the node in an incognito window.
To view teaser and short teaser displays of your contents to see how your content displays in lists, you can use the Drupal preview.
Published content is publicly available. If you make changes to a published node and save the node, the changes will also be publicly available. Again, the WYSIWYG editor provides a good preview for your main body content while you edit it. For other changes, you can use the Drupal preview - before you click save!
Drupal preview allows you to preview content changes before you save the node. Out of the box, the preview feature is set to be optional for most Sector content types.
The 'Preview' button is located next to the save button. Clicking it will take you to the preview screen.
Why can't I see the preview button?
Based on the limitations of Drupal preview, we decided to disable the preview on some content types because it added no extra value. This can be changed easily by Drupal sitebuilders in the content type settings.
To go back to the node edit form, select 'Back to content editing' ( 1 ).
The 'View mode' ( 2 ) lets you preview what the content will look like in different contexts. The view modes available will depend on the content type of the node you are previewing. There is generally at least:
- Full - the complete node
- Teaser - teaser of the content (may be displayed on the homepage or landing pages)
Some elements of your templates won't display in Drupal preview. Based on your theme and configuration this might include:
- Sector display options (display variants and content settings)
- Views and view blocks,
- Menus and menu blocks
- Block and content blocks.
Templates that are mostly built from these elements will not work with preview. This will include
- View pages,
- Landing pages with embedded views.
Some elements of your templates will not display accurately. Based on your theme and configuration this might include
- Breadcrumbs, and
- Any other elements that rely on the URL path.
In short ...
Drupal preview has come far, but it doesn't provide a 100% accurate preview of your content.
What about mobile devices, search engines, and social media platforms?
Very good question! Teaser displays of your content in external search results or social media feeds are important factors in marketing your content! Also, an ever growing number of your readers will read your content on mobile devices. Look at our tips on how to prepare your content for mobile devices and to be reusable across multiple platforms in Creating online content - how to make it useful, usable, and unique.