Skip to content
Product Documentation

Outbound Feeds Development - Output Types

Output Types

Fusion comes with a default outputType of html. If you need a response in another type, like xml, then the repo must provide that outputType either via a block or code in the repo’s components/output-types directory. Your outboundfeeds contains three outputTypes

  • xml
  • json
  • text

The json and text outputTypes are provided as blocks

"@wpmedia/json-output-block",
"@wpmedia/text-output-block",

The xml output-type is not a block, but it is still an npm package. Because it’s not a block it must be listed as a dependency in your package.json.

"dependencies": {
"@wpmedia/feeds-xml-output": "^0.2.2"
},

To use this module a components/output-types/xml.js file must be created that contains the following:

import { XmlOutput } from '@wpmedia/feeds-xml-output'
export default XmlOutput

Now all requests to fusion with the parameter ?outputType=xml will use this output-type to generate content.