Exploring the Possibilities of Gadget Development

tuesday march 15 2022 n.w
1 / 16
Embed
Share

Delve into the world of gadget development with insights on purpose, limitations, requirements, and examples. Learn how gadgets extend the functionality of Omni CMS through encapsulated applications and self-contained logic. Discover the configuration, API possibilities, and the essential files needed for building gadgets.

  • Gadget Development
  • Omni CMS
  • JavaScript
  • API
  • Configuration

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Tuesday, March 15, 2022

  2. 2 Exploring and Building Gadgets Exploring and Building Gadgets Cory Madden, Associate Product Manager

  3. Agenda Purpose and possibilities Requirements Configuration HTML & JavaScript Gadget library tools Additional API possibilities 3

  4. Purpose What is a gadget? Full application Self encapsulated Extends the functionality of Omni CMS 4

  5. Possibilities What are the limitations? Exists in an <iframe> Unable to directly access the main application context What are the possibilities? Any self-contained logic/code functionality Full use of Omni CMS APIs Full use of Metadata API Interaction with main application context via exposed methods in gadget library 5

  6. Examples 6

  7. Requirements Library Files gadgetlib.js or gadgetlib.min.js jQuery Gadget Files config.xml index.html Access files with a web browser Publish them through Omni CMS! 7

  8. Gadget Files config.xml Must be XML valid Allows you to specify gadget configurations This MUST exist as Omni CMS needs to read it index.html Main application file Includes the HTML, CSS, and JavaScript for the gadget 8

  9. config.xml <entry key= option >value</entry> Title Icon Description Thumbnail Types Sidebar Context Notifications Initial Height 9

  10. index.html Standard HTML document and structure May include Stylesheet references Third party JavaScript Must include jQuery for gadgetlib.js to function Must include gadgetlib.js for token handling and loading 10

  11. gadgetlib.js All API calls from gadgets require access tokens & environment details GadgetLib is a JavaScript library that handles the following: Handles environment details Sets up access token (deactivates after 30 minutes of inactivity) Provides global gadget object as an API to interact with Omni CMS Provides methods to use the Metadata API 11

  12. gadgetlib.js methods ready The gadget can communicate with Omni CMS oucGetCurrentFileInfo Returns relevant information about the containing file oucInsertAtCursor Inserts content at the cursor location in, and only in, the WYSWIYG or Source Code Editor oucGetCurrentLocation Returns the app window s location info oucSetCurrentLocation Sets the app route, everything after the siteName #cms/accountName/siteName/browse/staging/about /browse/staging/about 12

  13. gadgetlib.js Metadata API Two system gadgets utilize these methods for storing persistent data on the CMS. Create View Update Delete List 13

  14. Lets Dive In! Let s Dive In!

  15. Additional Resources Gadget Starter https://github.com/omniupdate/gadget-starter Omni CMS APIs https://developers.omniupdate.com/ 15

  16. Thank you! 16

Related


More Related Content