Gunrock has created Person nodes for everyone in his unit resulting in one big directory list. He wants to break this list out further by department and still give visitors a way to navigate between those departments and include a search/filter option.
Your SiteFarm site includes a customizable Person type vocabulary. You can edit this list to include different groups than the default.
- Navigate to Structure » Taxonomy or Shortcuts » Taxonomy (Categories)
- Locate the Person Type vocabulary in the list, and click its corresponding List terms button
- You’re provided with Faculty, Researcher, Staff, and Student as defaults. You’re welcome to use or delete the existing terms, and add your own using the + Add term button.
- Adding a term allows you to set the following:
- Name of the term
- Relations » Weight - the order in which the terms will appear. Setting a term to ‘1’ will make it appear first in the list
- Click Save to finish
Assigning a term to a Person node
- Navigate to your content and locate a Person node and click its Edit button
- In your page go to the Additional Options section and expand the Categorizing section. Set the Person type menu to your preferred vocabulary term
- Scroll to the bottom of the page and click Save to finish
- Continue this process for all the Person nodes to be included in your directories
Locate the link to your Person term pages
Each of the terms you’ve designated under the Person Type vocabulary will auto-generate a list of all the content sharing that term. You will need to take note of the pathway to each.
- Go to your main People page.
- From the Filter Results section on the right, look near the bottom to the Type drop-down menu.
- In the menu, select the desired term and click the "Apply Filter" button.
- The resulting page will show the page in the appropriate order, specifically by the type. Grab the URL, excluding the main domain (yoursite.sf.ucdavis.edu), so you have a snippet that looks like: "/people?first=&last=&title=&unit=&field_sf_person_type_target_id=26".
- Use the link snippet to either add a link to the main menu to point to this filtered page.
OPTIONAL - Add links to each term page in your main menu
You may want to give visitors a way to navigate directly to a term page. You can manually add the links to your primary menu.
- Navigate from either Structure » Main Menu or Shortcuts » Main Menu
- Click the + Add link button
- Provide the following:
- Link title - the text that will display in the menu
- Link - this is the /people?first=&last=&title=&unit=&field_sf_person_type_target_id=26" type information you collected in the previous step
- Parent link - you can choose to add this link as a child to an existing page like the Directory or a page of your own creation.
- Click Save to finish
- Re-order your links if necessary by dragging and dropping them into the order you want them to appear on-screen
- Click Save to finish
OPTIONAL - Create a submenu option so users can easily navigate back and forth from within your term-specific directory listings
- Navigate from Structure » Block layout or Shortcuts » Blocks
- Select the Custom block library tab
- Click the + Add custom block button
- Configure your block:
- Block description
- Body - create a bulleted list with the names of your departments and, for each, highlight the text, click on the link button, enter the URL field link as /person-type/yourtermname. Note, for a link to the main directory, the link is /directory
- Scroll to the bottom and click Save to finish
- Click the Block layout tab
- Choose the location where the navigation will display. It is recommended to use the First or Second Sidebar regions. Click the Place block button
- From the list of blocks, locate the one you made and click the Place block button
- Configure the block for this region:
- Title (required, but you can use the checkbox to determine visibility)
- Checkbox to display title or not
- If used, you will have access to the Block style menu
- Leave Column size as “Default"
- Visibility - list all your people terms by using /person-type/* and /directory, and make sure the Show for the listed pages radio button is selected. The asterisk (*) is a wildcard and instructs the system to include all content that is a child of /person-type/.
- Scroll to the bottom and click Save block
- Visit one of your term pages to see if the new menu appears
OPTIONAL - Display the Search/Filter box on all your term pages
- In the Block layout screen, locate the Exposed form: sf_person_directory-page_1 block listed in the Second Sidebar. Click its Configure button
- Go to the Visibility section and in Pages, list /person-type/* and /directory.
- Click the Save block button to finish.
- Visit your pages to see if the search/filter block is visible on all your person-type term pages
- In this example, if you wanted the submenu to appear over top of the search/filter block, you must make sure they appear in that order in the Block layout’s Second Sidebar region. You can drag and drop the options as needed and click Save to finalize your preference.
BONUS - VIP considerations
In larger organizations, it may be important to highlight a particular individual or team, especially from a leadership standpoint. You might consider using a custom block to create a special entry for that person or group, which you can then set to display at the top of your directory and/or term pages, much like the submenu block by setting it at the top of the list of blocks in the Block layout page.