Govspeak content example

Attachment

Attachment component rendered within Govspeak

How it looks (preview)

An attachment as a block

Attachment

Another attachment as a block

Attachment

Request an accessible format.
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email defra.helpline@defra.gsi.gov.uk. Please tell us what format you need. It will help us if you say what assistive technology you use.

How to call this example

<%= render "govuk_publishing_components/components/govspeak", {} do %>
  <p>An attachment as a block</p>

<%= render "govuk_publishing_components/components/attachment",
    attachment: { url: "https://example.com/file.odt",
                  title: "Attachment",
                  file_size: 1024,
                  content_type: "application/vnd.oasis.opendocument.text" }
%>
<p>Another attachment as a block</p>

<%= render "govuk_publishing_components/components/attachment",
    attachment: { url: "https://example.com/file.odt",
                  title: "Attachment",
                  file_size: 1024,
                  content_type: "application/vnd.oasis.opendocument.text",
                  alternative_format_contact_email: "defra.helpline@defra.gsi.gov.uk" }
%>
<% end %>