Middlebury

Difference between revisions of "Drupal 8 Office Menus"

 
Line 5: Line 5:
 
#Click '''+ Add menu'''  
 
#Click '''+ Add menu'''  
 
#For the '''Title''' field value, type '''Office Menu - Name of Office'''  
 
#For the '''Title''' field value, type '''Office Menu - Name of Office'''  
 +
#Click '''Save'''
 +
 +
== Create the Newsroom Vocabulary ==
 +
 +
This step is only needed if the office is going to have a newsroom.
 +
 +
#Navigate to /admin/structure/taxonomy
 +
#Click '''+ Add vocabulary'''
 +
#For the '''Name''' field value, type '''News Categories - Name of Office'''
 
#Click '''Save'''  
 
#Click '''Save'''  
  
Line 15: Line 24:
 
#Click the '''V''' (down chevron) icon to the right of the new role you've created and select '''Edit permissions'''  
 
#Click the '''V''' (down chevron) icon to the right of the new role you've created and select '''Edit permissions'''  
 
#Assign it the permission '''Administer ''Office Menu - Name of Office'''''  
 
#Assign it the permission '''Administer ''Office Menu - Name of Office'''''  
 +
#If the office has a newsroom, also assign the permissions '''''News Categories - Name of Office'': Create terms''', '''''News Categories - Name of Office'''''<b>: Delete terms</b>, and '''''News Categories - Name of Office'': Edit terms'''
 
#Click '''Save permissions'''  
 
#Click '''Save permissions'''  
 
#Click the '''V''' (down chevron) icon to the right of the Site Administrator role and select '''Edit permissions'''  
 
#Click the '''V''' (down chevron) icon to the right of the Site Administrator role and select '''Edit permissions'''  
#Assign it the permissions '''Administer ''Office Menu - Name of Office''''' and '''Assign''''''''Office Editors - Name of Office'' role'''  
+
#Assign it the permissions '''Administer ''Office Menu - Name of Office''''' and '''Assign ''Office Editors - Name of Office''''' role'''  
 
#Click '''Save permissions'''  
 
#Click '''Save permissions'''  
  
 +
&nbsp;
  
 
== Set up Content Types ==
 
== Set up Content Types ==
Line 30: Line 41:
 
#Click the '''Menu settings''' tab and check the '''Office Menu - Name of Office''' checkbox  
 
#Click the '''Menu settings''' tab and check the '''Office Menu - Name of Office''' checkbox  
 
#Click '''Save content type'''  
 
#Click '''Save content type'''  
#Click the '''V''' (down chevron) icon to the right of the Top Leveltype and select''''''Edit'''  
+
#Click the '''V''' (down chevron) icon to the right of the Top Leveltype and select''''''Edit'''''  
 
#Click the '''Menu settings''' tab and check the '''Office Menu - Name of Office''' checkbox  
 
#Click the '''Menu settings''' tab and check the '''Office Menu - Name of Office''' checkbox  
#Click '''Save content type'''
+
#Click '''Save content type'''
 +
#If the office has a newsroom, click '''Manage fields''' to the right of the Story type
 +
#Click '''Edit''' to the right of the '''Categories''' field
 +
#Under '''Vocabulary '''check the '''News Categories - Name of Office''' checkbox
 +
#Click '''Save settings'''  
  
 
== Set up the Header Block ==
 
== Set up the Header Block ==
Line 73: Line 88:
 
#Set the '''Menu link title''' field value to '''Name of Office'''  
 
#Set the '''Menu link title''' field value to '''Name of Office'''  
 
#Set the '''Link''' field value to /group/### where ### is the id of the group for the office  
 
#Set the '''Link''' field value to /group/### where ### is the id of the group for the office  
#Click '''Save'''
+
#Click '''Save'''  
  
 
[[Category:Drupal 8]]
 
[[Category:Drupal 8]]

Latest revision as of 10:55, 1 June 2020

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

Create the Newsroom Vocabulary

This step is only needed if the office is going to have a newsroom.

  1. Navigate to /admin/structure/taxonomy
  2. Click + Add vocabulary
  3. For the Name field value, type News Categories - 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. If the office has a newsroom, also assign the permissions News Categories - Name of Office: Create terms, News Categories - Name of Office: Delete terms, and News Categories - Name of Office: Edit terms
  8. Click Save permissions
  9. Click the V (down chevron) icon to the right of the Site Administrator role and select Edit permissions
  10. Assign it the permissions Administer Office Menu - Name of Office and Assign Office Editors - Name of Office role
  11. 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 Newsroom type and select Edit
  6. Click the Menu settings tab and check the Office Menu - Name of Office checkbox
  7. Click Save content type
  8. Click the V (down chevron) icon to the right of the Top Leveltype and select'Edit
  9. Click the Menu settings tab and check the Office Menu - Name of Office checkbox
  10. Click Save content type
  11. If the office has a newsroom, click Manage fields to the right of the Story type
  12. Click Edit to the right of the Categories field
  13. Under Vocabulary check the News Categories - Name of Office checkbox
  14. Click Save settings

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