Content parts that you create in aNewSpring are exported as HTML files. The file name will be the ID of the content part. If the content part doesn't have an ID, it will be the name of the content part.

To be a valid content part, the HTML files need some metadata (examples below):

  • code: This is the ID of the content part.
  • path: This determines in which folder in the content library you will find the content part.
  • template: For a Plus Editor content part, this will say Freeform. For a Blank page content part it will be empty. If a Blank page content part uses a "content part template", this will be the name. Content part templates are obsolete since the Plus Editor can give authors more freedom.
  • maxCanvasSize: This is the "Relative canvas width" setting that you find under the Settings tab when you edit a content part.
  • canvasWidth: This is the "Absolute canvas width" setting that you find under the Settings tab when you edit a content part.
Type: Blank page

HTML files of content parts of the type Blank page only contain HTML. 

For example:

<html>
  <head>
    <title>Example content part</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="code" content="ID001" />
    <meta name="path" content="Main folder/Sub folder" />
    <meta name="template" content="" />
    <meta name="maxCanvasSize" content="70" />
    <meta name="canvasWidth" content="0" />
  </head>
  <body>
    <div>
      This is an example content part.
    </div>
  </body>
</html>
Type: Content part (Plus Editor)

If you created a content part in the Plus Editor (this is the default setting of a content part), the body of the HTML will consist of JSON code. This code is specific to content parts in aNewSpring.

For example:

<html>
  <head>
    <title>Example content part</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="code" content="ID001" />
    <meta name="path" content="Main folder/Sub folder" />
    <meta name="template" content="Freeform" />
    <meta name="maxCanvasSize" content="70" />
    <meta name="canvasWidth" content="0" />
  </head>
  <body>
{
  "audio": {
    "autoplay": false,
    "src": ""
  },
  "data": [
    {
      "data": {
        "content": "<div>This is an example content part.<\/div>"
      },
      "id": 0,
      "type": "mt/layout/CellType/Text"
    },
    {
      "data": {
        "imgDescription": "",
        "imgHotspots": {
          "hotspots": [],
          "visibility": "always"
        },
        "imgSrc": "content/Content_Library/example-image.png",
        "imgWidth": "100%"
      },
      "id": 1,
      "type": "mt/layout/CellType/Image"
    }
  ],
  "layout": {
    "content": [
      {
        "content": [0],
        "split": "none",
        "width": "50%"
      },
      {
        "content": [1],
        "split": "none",
        "width": "50%"
      }
    ],
    "split": "vertical",
    "width": "100%"
  },
  "title": ""
}
  </body>
</html>