Static Content Definiton File

From VZ Developer Wiki
Jump to: navigation, search

The Static Content Definition File is a file in which you can declare static resources for your gadget, which later can be embedded in every user generated content by a designated Embedding url.

The file has to be called static_content.json and has to be placed in the gadget root. At the moment you can declare the following resource types:

  • image (any image url, together with an optinal link)
  • flash (any flash url)
  • rich (any URL that will be delivered through an IFRAME)

All URLs can be either absolute or relative to the gadget root folder.

See Vz.embed for methods to access this resources and to create OEmbed links for them.

Example:

{
    "key_resource_img": {
        "type": "image",
        "content": {
            "src": "url to image",
            "href": "link for image",
            "title": "title for image link"
        }
    },
    "key_resource_img2": {
        "type": "image",
        "content": {
            "src": "url to image",
        }
    },
    "key_resource_flash": {
        "type": "flash",
        "content": {
            "src": "url to flash"
        }
    },
    "key_resource_rich": {
        "type": "rich",
        "content": {
            "href": "url to iframe"
        }
    }
}