1. Government Frontend Component Guide
  2. Admin layout

Component

Admin layout

A layout to be used by admin applications

Typically you’ll use this together with the layout header component and the layout footer component.

Because it is an entire HTML document, this component can only be previewed on a separate page.

Search for usage of this component on GitHub

How it looks (preview all)

<!DOCTYPE html>
<html lang="en" class="govuk-template">
  <head>
    <meta charset="utf-8" />
    <title>A page title - GOV.UK Publishing</title>
    <meta name="robots" content="noindex,nofollow,noimageindex">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="i6EUCzXWHuonm0yTSZEx36HoaKUYNyaf1je+MSCmeZRMBLVMSwlSZO/MCjplJj13JbVZBgDG48kFnBkCbq3SjA==" />
    <link rel="shortcut icon" type="image/x-icon" href="https://government-frontend.herokuapp.com/government-frontend/govuk_publishing_components/favicon-production-3d29621e53fc949f82338b9efeaeaa1a803066deef2e8e6b390c23d79c21c90b.png" />
    <link rel="stylesheet" media="screen" href="https://government-frontend.herokuapp.com/government-frontend/application-33fd250935bbc20b71535b0591d8c5b1639730485c5a9e68dd03d65611373da5.css" />
    <script src="https://government-frontend.herokuapp.com/government-frontend/govuk_publishing_components/vendor/modernizr-a694b2e4420935261ee2a50f5702d93197f5207f75a24a6ecdae2bfea4a160a3.js"></script>
    
  </head>
  <body class="gem-c-layout-for-admin govuk-template__body">
    <script>
      document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
    </script>
    
      <!-- You probably want to use the header, main & footer components here -->


    <script src="https://government-frontend.herokuapp.com/government-frontend/application-e9ac08982e0d44255086bcbef49850325242b6afb96901b43145e174892fc6e8.js"></script>
  </body>
</html>

How to call this component

<%= render "govuk_publishing_components/components/layout_for_admin", {
  environment: "production",
  product_name: "Publishing",
  browser_title: "A page title"
} do %>
  <!-- You probably want to use the header, main & footer components here -->
<% end %>

Accessibility acceptance criteria

TBD