Vocabularies Site Sections - NCIOCPL/cgov-digital-platform GitHub Wiki

Related Resource: Section Navigation Cache Clearing Tests Cases

Naming

  • Display Name: Site Sections
  • Machine-readable Name: cgov_site_sections
  • Migration Rule: The source of this will be navtree and navon

Description

Defines the sections of the website, which inform the URL.

  • Main Nav Desktop primary navigation (elements in the black bar)
  • Megamenu is what shows up when you hover
  • Section Nav is desktop left nav / tongue on mobile
  • Mobile navigation = hamburger
  • Site sections is the complete taxonomy
    • A site section is equivalent to a folder or navon in Percussion

Local Fields

Site Section Name*

This is the name field

  • Field Name: This should be the Entity(node, media) Name
  • Label: Site Section Name
  • Type: This should be the Entity(node, media) Name
  • Required: Yes
  • Max characters: 100
  • Tooltip Text: The name for this section of the site. This should be a unique title. [Displays in left navigation (if selected to display)]
  • Cardinality: 1
  • Translatable: Yes
  • Migration Rule: This is the unique name within the system TBD

Navigation Label Override

Used as an override to the Navigation Name, to be displayed in the left navigation and breadcrumb

  • Field Name: navigation_label
  • Label: Navigation Label
  • Type: Text (plain)
  • Required: No
  • Max characters: 100
  • Tooltip Text: Left navigation label to override the Navigation Name.
  • Cardinality: 1
  • Translatable: No
  • Migration Rule:

Pretty URL

Used as the "tail" of the URL. When building URL aliases for the section, the parent section's pretty URL path is pre-pended to this.

  • Field Name:
  • Label: Pretty URL
  • Type: field_pretty_url
  • Max Characters: 100
  • Required: No
  • Validation Rules:
    • No capital letters
    • Only allows 0-9, a-z, and - (dash)
    • When preceded by the parent section's pretty URL path, the full alias must be unique within the site
      • This includes validating against any microsite (future requirement)
      • Note: will need to check if a page on the site already exists with this same pretty URL and lives within this parent section
      • Further refinements will need to be made to previous rule
  • Cardinality: 1
  • Translatable: No
  • Migration Rules: This is basically the most immediate folder names in percussion (except for the root, e.g. cancer.gov, spanish, dceg, etc.)

Section Nav Root

  • Field Name: field_section_nav_root
  • Label: Section Nav Root
  • Type: Checkbox
  • Max Characters:
  • Required: No
  • Validation Rules:
    • Defaults to not checked
  • Cardinality:
  • Translatable:
  • Migration Rule: This is true (checked) if the source navon has a section nav content item slotted into the section nav slot. Assumption: The root of the section nav is the same as the navon that it is slotted into.

Number of Levels to Display

  • Field Name: field_levels_to_display
  • Label: Number of Levels to Display
  • Type: Text box
  • Max Characters:
  • Required: Yes (if section nav root is checked)
  • Validation Rules:
    • Only allows numbers of 1-5
    • If section is set as nav root, default to display 5 levels deep
      • User has the ability to edit this number to be less than 5
    • If section is not set as nav root, do not show this option to set # of levels to display
  • Cardinality: 1
  • Translatable:
  • Migration Rule: This is the number of levels to display for the section nav that is slotted into the source navon's section nav slot

Show in Navigation

  • Field Name: field_navigation_display_options
  • Label: Show in Navigation
  • Type: List of check boxes (allows for more than one to be checked)
  • Max Characters:
  • Required: No
  • Validation Rules:
    • Default to nothing checked, which means "Show in all navs"
    • Options:
      • Hide in Main Nav
      • Hide in Section Nav
      • Hide in Mobile Nav
  • Cardinality: 1
  • Translatable:

Landing Page

  • Field Name: field_landing_page
  • Label: Landing Page
  • Type: Entity Reference
    • Allowed Types: Any Node
  • Max Characters: N/A
  • Required: No
  • Validation Rules:
  • Cardinality: 1
  • Translatable:

Main Nav Root

  • Field Name: field_main_nav_root
  • Label: Main Nav Root
  • Type: Checkbox
  • Max Characters:
  • Required: No
  • Validation Rules:
    • Defaults to not checked
  • Cardinality:
  • Translatable:
  • Migration Rule: If it is root for the site (cancer.gov, spanish, dceg, nano, nciconnect, mypart), then this checkbox is yes

Megamenu Contents

  • Field Name: field_mega_menu_content
  • Label: Megamenu Content
  • Type: Entity Reference
    • Allows content block
  • Required: No
  • Validation Rules:
    • Defaults to not checked
  • Cardinality: 1
  • Translatable:

NCIDS Megamenu Contents

  • Field Name: field_ncids_mega_menu_content
  • Label: NCIDS Megamenu Contents
  • Type: Entity Reference
    • Entity Type: block_content
    • Allows ncids_mega_menu_content
  • Required: No
  • Validation Rules: None
  • Cardinality: 1
  • Translatable:

Set Breadcrumb Root

  • Field Name: field_breadcrumb_root
  • Label: Set Breadcrumb Root
  • Type: Site structure Dropdown (out of the box) unless we have a fancier option
  • Required: No
  • Validation Rules:
    • Defaults to not checked
  • Cardinality: 1
  • Translatable:
  • Migration Rule: If it is root for the site (cancer.gov, spanish, dceg, nano, nciconnect, mypart), then this checkbox is yes

The "landing page" for a section will be the page in the system that has that site section and no pretty URL.

  • Pages that do not have their own site section (will be assigned to their parent site section) will (by default of not having a site section) not show in navigation. If the pretty URL is left blank, the system should provide a validation error for Pretty URL Name -- pretty URL must be unique within the folder and not include any HTML encoded characters)

Form Display Order

How the fields should display on the form

Page Display

Note: Site Sections should NOT be translated

Section navigations will show the number of levels as specified in the CMS - up to 5 on both desktop and mobile.

Section Navigation Rules

  • If a Site Section does not have a "Landing Page" then the Site Section will not show in any navigation.
    • Additionally none of its children will not show in navigation as well.
  • Example: https://www.cancer.gov/research/key-initiatives/ras — If a Site Section should not display as a child in its parent section, it should be set to hide in section nav and show as nav root.
  • Scenarios for allowing deletion of a site section:
    • If a site section does not have an associated landing page AND
      • There are no nodes or media items (e.g. video, infographic) that are associated with that site section then the site section can be deleted.
    • If a site section is a parent to other sections, and all of its children sections have no associated landing page AND associated nodes/media types, then the parent site section can be deleted, along with the sub sections.
    • If a site section is a parent to other sections, but its children sections have associated nodes, then the parent cannot be deleted until all associations from its children have also been removed.
    • Only site admins should be allowed to delete site sections
  • If a taxonomy is currently in usage on a node, users should be prevented from deleting, and a message should appear on the taxonomy term indicating that the term is in use, along with the node ID(s) of where its being used
  • If a user reverts a node back to a previous version, and the associated site section has been deleted from the system, the Site Section field on the node should be empty, and require user to enter a new site section

Main Navigation Rules

Mobile Navigation Rules

BreadCrumb Rules

  • Do not display empty site sections in the breadcrumbs - Breadcrumbs only shows actual pages assigned to site section
⚠️ **GitHub.com Fallback** ⚠️