Directories by Terms

Scenario

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.

Taxonomy

Your SiteFarm site includes a customizable Person type vocabulary. You can edit this list to include different groups than the default.

  1. Navigate to Structure » Taxonomy or Shortcuts » Taxonomy (Categories)
  2. Locate the Person Type vocabulary in the list, and click its corresponding List terms button
  3. 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.
  4. Adding a term allows you to set the following:
    1. Name of the term
    2. Relations » Weight - the order in which the terms will appear. Setting a term to ‘1’ will make it appear first in the list
  5. Click Save to finish

Assigning a term to a Person page

  1. Navigate to your content and locate a Person page and click its Edit button
  2. In your page go to the Additional Options section and expand the Categorizing section. Set the Person type menu to your preferred vocabulary term
  3. Scroll to the bottom of the page and click Save to finish
  4. Continue this process for all the Person pages 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.

  1. Go to your main People page.
  2. From the Filter Results section on the right, look near the bottom to the Type drop-down menu.
  3. In the menu, select the desired term and click the "Apply Filter" button.
  4. 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[0]=26".
  5. 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.

  1. Navigate from either Structure » Main Menu or Shortcuts » Main Menu
  2. Click the + Add link button
  3. Provide the following:
    1. Link title - the text that will display in the menu
    2. Link - this is the /people?first=&last=&title=&unit=&field_sf_person_type_target_id[0]=26" type information you collected in the previous step
    3. 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.
    4. Click Save to finish
  4. Re-order your links if necessary by dragging and dropping them into the order you want them to appear on-screen
  5. Click Save to finish

OPTIONAL - Create a submenu option so users can easily navigate back and forth from within your term-specific directory listings

  1. Navigate from Structure » Block layout or Shortcuts » Blocks
  2. Select the Custom block library tab
  3. Click the + Add custom block button
  4. Configure your block:
    1. Block description
    2. 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
    3. Scroll to the bottom and click Save to finish
  5. Click the Block layout tab
  6. Choose the location where the navigation will display. It is recommended to use the First or Second Sidebar regions. Click the Place block button
  7. From the list of blocks, locate the one you made and click the Place block button
  8. Configure the block for this region:
    1. Title (required, but you can use the checkbox to determine visibility)
    2. Checkbox to display title or not
    3. If used, you will have access to the Block style menu
    4. Leave Column size as “Default"
    5. 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/.
    6. Scroll to the bottom and click Save block
  9. Visit one of your term pages to see if the new menu appears

OPTIONAL - Display the Search/Filter box on all your term pages

  1. In the Block layout screen, locate the Exposed form: sf_person_directory-page_1 block listed in the Second Sidebar. Click its Configure button
  2. Go to the Visibility section and in Pages, list /person-type/* and /directory.
  3. Click the Save block button to finish.
  4. Visit your pages to see if the search/filter block is visible on all your person-type term pages
  5. 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.

Tags