Frage

So I might be doing this entirely wrong, but I am trying to create a slideshow based on images stored in a google drive folder that can be easily added (ie by a non-technical person) to a google site.

I created a script that outputs the slideshow using the HTMLService. You can view the working site at https://script.google.com/a/macros/needham.k12.ma.us/s/AKfycbyOyqTr_sEMWRVBn0e0r4NV5083_LwzZSMYwPU-25_xd2m6ZexS/exec?width=300&height=200&folderID=0B-6QUsY0bQG5ZmI4QTl4T1ZQZmc

When I try to insert this script into a google site using the Apps Script Gadget (Screenshot 1) using the link above it appears that the parameters are either lost or ignored (Screenshot 2). When I hard code the parameters into the script, the slideshow loads correctly (Screenshot 3).

Screenshot 1

Screenshot 1

Screenshot 2

Screenshot 2

Screenshot 3

Screenshot 3

War es hilfreich?

Lösung

You cannot add the parameters to the URL when inserting your script in a Google Site. However, you can pass the parameters to the Site URL utself and the script will pick it up. For example, http://sites.google.com/example.com/example-site/example-page?folderID=1235

As for the width and the height, you can adjust them when you insert the script into a Site using controls that Google Sites provides

Andere Tipps

Same happened to me. My solution was to write a google gadget that iframed my apps script and added fhe necesary parameters.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top