Trimmings Trimmings

Embed

Replaces an <a> tag with the contents of the link it points to.

<a data-trimmings-embed="main" href="/thumbnails">
  Thumbnails
</a>

Arguments

Internal only

A link that does not point at an internal page will not be embedded. The link’s href must either not specify a host or it must match the current host. Additionally, the path must not match the current path.

Current page URL Link href Embeddable?
http://example.com/about /contact Yes
http://example.com/about /about?query=hours Yes
http://example.com/about http://example.com/about No
http://example.com/about http://google.com/ No
http://example.com/about /about No

If the element’s display style property is none, it will not be replaced. If its display property changes as the result of a DOM change (like adding a class), its embed hint will be followed immediately. If the element is hidden by other means (for example, a parent element has the display: none style) but this <a>’s display property is not none, it will still be fetched and embedded.