Menu:

API Introduction

The purpose of the Weebly API is to allow a site to create an "Add to Weebly" button, which will export the settings a user has chosen on the site as a custom element in Weebly. The user will be able to access all of these custom elements in a category dedicated to "Imported Elements", and easily drag them onto their page.

Weebly is built around the concept of "elements". Each element can be dragged onto a page by the user. Each element has an ID (the Element ID), and is composed of multiple Content Fields, which have their own ID (Content Field ID). Content Fields are independent "items" within an element (such as a title, picture, paragraph, Google Maps, Flash object, or Javascript object), and can be double-clicked to reveal their options. Each Content Field can have properties, and each of these properties have a unique ID (Content Field Property ID).

Let's take a step back and look at a simple widget.

The widget is an RSS reader and has three options: theme, update frequency (in minutes), and feed location. It is embedded through a one line Javascript include, and the options are passed on the query string to the included file.

On Weebly's end, there will be a unique Element ID which identifies this widget. It will be composed of one Content Field for the Javascript include. Each of the widget's properties are defined as a Content Field Property, and they are each identified by their own unique IDs.