Usage
This page describes how the Presentation Preview plugin works and how to use it.
This plugin is meant to be activated on a network level. Log in to "Network Admin -> plugins" to activate the plugin for all sites. The plugin will then expose its API endpoint for previews.
The "API endpoint" is compatible with the Presentation Preview plugin in Dashboard
Adding support for article preview to your theme.
The plugin will load the file previews/single-article.php
in the currently active theme. The plugin will also look for this file in a parent theme if WordPress theme inheritance is used.
From this file, the variable $previewData
will be available. Here you will be able to find the data sent to the endpoint. The variable will implement \Everyware\Plugin\PresentationPreview\Contracts\PreviewData
.
ex.
The basic data
you will need is the article body from the content
. This should be the NewsML body of the article. You will find it as BodyRaw
in a public Open Content.
You may also fetch any related material such as Concepts
and Articles
.
The Imengine URI can also be fetched through this interface.
You can use the getMetaData
method to get hold of any other data
that might be sent to the API. This method will return an array
of all the meta.
Last updated
Was this helpful?