Skip to content
Advertisement

How can I create dynamic components with Google App Scripts for Google Sites?

I am trying to create dynamic app script components that can be added into my site with dynamic data for each instance of the script. I tried doing parameters, but I am not sure if that’s the best way to approach this. For example, I want to create an image script that be loaded with dynamic links, and inserted into google sites. I only want one image script can be loaded multiple times into the page with dynamic urls. How should I handle this? Can this be done? Thanks.

Advertisement

Answer

This version creates scrolling images display or a slide show. And it creates the image tags in an otherwise empty div. You can add as many images to column A of your spreadsheet and the script will do the rest.

image.html:

JavaScript

Code.gs

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement