Middlebury

Drupal 8 Office Site Setup

Revision as of 15:02, 1 October 2019 by Ian McBride (talk | contribs)

Create the Menu Object

  1. Navigate to /admin/structure/menu
  2. Click + Add menu
  3. For the Title field value, type Office Menu - Name of Office
  4. Click Save

Set up Permissions

  1. Navigate to /admin/people/roles
  2. Click + Add role
  3. For the Role name field value, type Office Editors - Name of Office
  4. Sort the role so that it appears in the list alphabetically and click Save
  5. Click the V (down chevron) icon to the right of the new role you've created and select Edit permissions
  6. Assign it the permission Administer Office Menu - Name of Office
  7. Click Save permissions
  8. Click the V (down chevron) icon to the right of the Site Administrator role and select Edit permissions
  9. Assign it the permissions Administer Office Menu - Name of Office and Assign'''Office Editors - Name of Office role
  10. Click Save permissions

Set up Content Types

  1. Navigate to /admin/structure/types
  2. Click the V (down chevron) icon to the right of the Basic Content type and select Edit
  3. Click the Menu settings tab and check the Office Menu - Name of Office checkbox
  4. Click Save content type
  5. Click the V (down chevron) icon to the right of the Top Leveltype and select Edit
  6. Click the Menu settings tab and check the Office Menu - Name of Office checkbox
  7. Click Save content type

Set up the Header Block

  1. Navigate to /admin/structure/block
  2. Click Place block next to Header
  3. Click the Place block button to the right of Office Menu - Name of Office in the list
  4. Uncheck the Display title option
  5. Under Menu Levels set Initial visibility level to 1 and Number of levels to display to 2
  6. Under Advanced Options check the Expand all menu links checkbox and set Fixed parent item to <Office Menu - Name of Office>, ensuring that it is the option with carets around it
  7. In the Visibility section under Pages add these two lines and ensure that Show for the listed pages is selected:
    1. /path-to-the-office
    2. /path-to-the-office/*
  8. Click Save block
  9. Sort the block so that it appears in the list alphabetically and click Save blocks

Set up the Left Navigation Block

  1. Navigate to /admin/structure/block
  2. Click Place block next to Left Navigation
  3. Click the Place block button to the right of Office Menu - Name of Office in the list
  4. Uncheck the Display title option
  5. Under Menu Levels set Initial visibility level to 2 and Number of levels to display to Unlimited
  6. Under Advanced Options set Fixed parent item to <Office Menu - Name of Office>, ensuring that it is the option with carets around it
  7. In the Visilibility section under Pages add this one line and ensure that Show for the listed pages is selected:
    1. /path-to-the-office/*
  8. Click Save block
  9. Sort the block so that it appears in the list alphabetically and click Save blocks

Deploy the new Menus

  1. yes | drupal config_split:export
  2. git add /config/offices
  3. git commit -m "offices: Set up menus for Name of Office."
  4. git push
  5. deploy_drupal8 -y
  6. Navigate to /admin/structure/menu in the production site
  7. Click Edit menu to the right of Office Menu - Name of Office
  8. Click + Add link
  9. Set the Menu link title field value to Name of Office
  10. Set the Link field value to /group/### where ### is the id of the group for the office
  11. Click Save
Powered by MediaWiki