Aslak Grinsted‎ > ‎Misc. Debris‎ > ‎

Inserting custom gadgets in Google Sites.

posted Mar 19, 2008, 1:57 AM by Aslak Grinsted   [ updated Aug 6, 2008, 11:58 PM ]
Google Sites does not allow you to insert javascript, iframes, *** in your html. That makes it very difficult to insert custom media players, flash objects and other widgets in a google sites page. Luckily there is a workaround using a google gadget wrapper. You may already know google gadgets from your iGoogle page. Google gadgets are basically just iframes containing some html/javascript. So, if you are familiar with javascript then it is really very easy to make your own gadgets. 
In the most basic case you just want the gadget to work like an iframe or execute a small javascript or something similar. In those cases you may want to save some time by simply utilizing my flexiblegadget:
Here's how you go about inserting it in Google Sites:
Note, there has been some bugs in Google-Sites which means that preferences of the gadget is forgotten. One trick to overcome those problems is to insert the gadget in an igoogle page, set up all the settings, and then inspect the source/dom to find the relevant iframe link. This link can then be copied and put in place of the Google-Sites generated iframe link (by entering the html mode of the Google-Sites editor).