Theodore Roosevelt Presidential Library Labs

TRPL Labs  /  Content Tool

Content Tool

DAM Portal Embed

Turns a locked-in press portal into native, auto-sizing gallery tiles on your own page.

Screenshot of DAM Portal Embed

Try it right here

This loads the live project from its own domain, exactly as a visitor would see it.

What it does

Acquia DAM (Widen) portals can only be embedded as a fixed-height iframe with its own interior scrollbar, and the portal's JSON API sends no CORS headers, so a browser cannot read it directly. Both problems are solved server-side.

A scheduled job snapshots the portal's sections and galleries and permanently caches the thumbnails — necessary because Acquia's preview URLs are pre-signed and expire within a couple of hours. The result renders as ordinary page content that grows to fit. Clicking a tile opens the real gallery, deep-linked, so press users still download through Acquia's own controls.

What it can do

  • Native auto-sizing tile grid instead of a fixed-height iframe
  • Thumbnail caching that defeats expiring pre-signed URLs
  • Deep-linked lightbox into the real portal gallery and its download controls
  • Refresh every six hours by GitHub Action, plus a manual trigger
  • Works with any Acquia DAM portal — add it to config.json
  • About twenty data-* styling options: accent, fonts, tile size, aspect ratio, badges

Make it your own

Start by forking the repository into your own organization. Everything below assumes you are working in your fork, not this one.

# clone your fork git clone https://github.com/YOUR-ORG/AcquiaDAM-Photo-Embed.git cd AcquiaDAM-Photo-Embed
  1. Fork the repo and replace the entry in config.json with your portal: domain, shortcode, and path. The path is the portal URL segment with spaces removed.
  2. Commit, then run the update-portal-data Action manually. It writes data/<shortcode>.json and downloads thumbnails into data/thumbs/<shortcode>/.
  3. Enable GitHub Pages and set your own CNAME and DNS if you want a custom domain.
  4. Override the brand defaults on the script tag with data-accent, data-rule, data-heading-font, and data-title-font.
  5. Paste the embed into any raw-HTML block, pointing data-data-url at your own generated JSON.

Stuck on a step? Open an issue on the repository. Questions from people adapting these for their own institution are the most useful feedback we get.