Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 8.0.0
HTML
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

XML Specifications

Status
colourRed
titleThis is an experimental feature

User created gadgets are not supported at this time and the specification below could change without notice. If you want to make your own gadget, please get in touch so we can help you.

Table of Contents

XML Specification

The XML gadget specification is based on the Atlassian Gadgets.

Implemented Tags

The implemented tags and corresponding attributes are:

  • ModulePrefs

    Description
    • title
    • width - "full" or "half" are the only options for now
  • ContentSources
    • type - "file" uses the file given in src, "html" uses the content in the tag (eg. ﹤Content type="html"﹥This is the content﹤/Content﹥)
    • src - relative filename or url
  • Source
    Fields
    • type - "css" or "javascript"
    • src - relative filename or url
  • Field
    • slug

Example

Code Block
languagehtml/xml
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
    <ModulePrefs title="Contact Info" width="half" />
    <Description>This gadget adds a field editor for fields related to contact info (phone, address, ect).</Description>
    <Content type="file" src="template.html" />
    <Sources>
       <Source type="javascript" src="script.js" />
    </Sources>
    <Fields>
       <Field slug="6c-resourceholder-phone-main" />
       <Field slug="6c-resourceholder-phone-fax" />
    </Fields>
</Module>

 

Fields

If a gadget uses fields, you can optionally add the slug of the field in this section to hide it from the main field list.

...