Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8733789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:43:19+00:00 2026-06-13T09:43:19+00:00

I am trying to create a Google Apps Script Gadget for my google sites

  • 0

I am trying to create a Google Apps Script Gadget for my google sites page. The gadget should display a list of 3 URLs to links within the site based on a search string.

e.g. a site contains many articles on dogs. A user opens up an article on “how to train your dog”. At the bottom of the page would be the gadget listing 3 other articles with similar key words.

//global constants
var SEARCH_KEY = "train your dog"

// Script-as-app template.
function doGet() {
  var app = UiApp.createApplication();
  var mySite = SitesApp.getSite('mysite.com','mysite');

  var advancedArgs = {max:"3"};
  var page = mySite.search(SEARCH_KEY, advancedArgs);

  for (i = 0; i < page.length;i++)
  {
    app.add(app.createHTML('<a href=\"' + page[i].getUrl() + '\">' + page[i].getTitle() + '</a>'));
    app.create
  }

  return app;
}

However, the createHTML function only seems to accept basic formatting such as bold, itallic. Does anyone have any ideas on how to create a list of URLs within a gadget?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:43:20+00:00Added an answer on June 13, 2026 at 9:43 am

    There is a special widget for this purpose : createAnchor(“a link”, “www.google.com”);

    in which you can define the shown string and the link…

    EDIT : for info, here is a list of allowed HTML tags in UiApp HTML widget 🙁release note March 7, 2012)

    Added the ability to include a limited set of HTML tags when working with UiApp widgets, in response to this issue. Here is the list of HTML tags that are permitted: B, BLOCKQUOTE, BODY, BR, CENTER, CAPTION, CITE, CODE, DIV, EM, H1, H2, H3, H4, H5, H6, HR, I, LABEL, LEGEND, LI, OL, P, SPAN, STRONG, SUB, SUP, TABLE, TBODY, TD, THEAD, TITLE, TR, TT, UL

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a time-based trigger from a Google Apps Script published
I am simply trying to use google apps script code to create a new
I was trying to create a Google Apps Script, that takes attachment of e-mails,
I am trying to create an app in Google apps script, but I want
I am trying to create Google Chrome extension that will send interesting links to
I'm trying to create a GreaseMonkey script that automatically extends the list of alerts
I'm trying to create a Google Map that will display multiple geodesic lines originating
I am trying to create a Google maps link by building it up with
I am trying to create a Google line chart using their API and JSON.
I have been trying to create a new google custom search engine, but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.