How to add, reuse, and edit Remote Script assets

What should I use it for?

This asset you to embed external content right inside a LibGuides box. You can write scripts (on your own web server, in any programming language) to display any type of data from any system without having to use iframes or any other tricks, as long as the output is in HTML format. The content you display using your script will populate the asset portion of your box seamlessly.

What shouldn't I use it for?

If you’re adding a link/URL to any page, RSS feed, image or video, or anything else that you can use one of the standard asset types for, you should use that asset type.

 Caution: these assets are for advanced users

The Remote Script asset type is intended for the more experienced LibGuides user and, as such, it has a "handle with care" caveat: while you can access and edit this content type from the Content > Assets page, fixing problems that arise from not using it properly may require Springy assistance. Please review the other types of assets to ensure that you are using the correct asset type for your content.

As always, if you're not sure, ask us! We'd be happy to help :)


Add a new Remote Script asset to a guide

To create a brand new Remote Script asset from scratch and add it to your guide:

  1. While editing your guide, click on the  Add / Reorder button at the bottom of the box where you want add this.
  2. Select Remote Script from the dropdown menu.
  3. Give your asset a name in the Name field. This is how the asset will be identified in your assets library.
  4. In the Script URL field, enter the URL to your remote script.
    • Remote scripts must be hosted on your own web server.
    • You cannot host PHP or other script files directly in LibGuides.
  5. Use the Position option to choose where the new asset should be inserted in the box. (Don't worry: you can always reorder it later.)
  6. Click the Save button.

 Requirements for remote scripts

Your script has to output the data to stdout in order to display it inside a LibGuides box. Please keep the following things in mind:

  1. Your content will be wrapped inside a <div> in the content box so make sure you properly close your <div> elements. If you leave any <div> tags open, that could interfere with display of the rest of the boxes on the page.
  2. You do not need to have <body><head>, and similar tags in your script - just output the content you want displayed inside the box.
  3. Use absolute paths for any images and links inside your script. In other words, use href="http://yourdomain/yourpage.html" instead of href="yourpage.html" (the same is true for src= attributes).

Selecting Remote Script from the Add/Reorder dropdown

Creating a new Remote Script asset


Reuse an existing Remote Script asset

It's always best to reuse existing assets as much as possible. This will help reduce duplication in your assets library.

To reuse an existing Remote Script asset from your assets library (Content > Assets):

  1. While editing your guide, click on the  Add / Reorder button at the bottom of the box where you want add this.
  2. Select Remote Script from the dropdown menu.
  3. In the Add Remote Script window, click on the Reuse Existing Remote Script tab.
  4. In the Search for Remote Script field, start typing in the name of the asset you want to add.
  5. Select the asset you want to add from the list of results.
  6. Use the Position dropdown to select where in the box the new asset will be inserted. (Don't worry: you can always reorder this later.)
  7. Click the Save button.

Selecting Remote Script from the Add/Reorder dropdown

Selecting an asset to reuse

Saving a reused asset


Edit and remove Remote Script assets in a guide

  1. To manage an asset, click on the its Edit () icon.
    1. If you own the asset, select  Edit to customize it.
    2. ‚ÄčTo remove the asset from your guide, select  Remove.
      • This will only remove the asset from your guide. It will not delete the asset from your assets library (Content > Assets) and can still be reused.

Options for editing an asset


Editing Remote Scripts in your assets library

The assets library is where all reusable assets are stored in your LibGuides system. From here, you can centrally manage your assets, as well as create new ones.

  • Admin users can edit any asset in the system.
  • Regular users with the Manage Assets permission (CMS only) can also edit any asset.
  • All other Regular and Editor users can only edit the assets they own.

To edit your Remote Script assets:

  1. Go to Content > Assets.
  2. Use the filters at the top of the page to filter the assets library (such as by type or owner).
  3. To edit an asset, click on its Edit () icon in the Actions column.
    • Changes made to the asset will be reflected everywhere the asset is being used.

Navigating to the Assets page

Filtering the assets list

Clicking an asset's Edit icon

Related Articles