Skip to main content
edited tags
Link
avpaderno
  • 98.1k
  • 15
  • 165
  • 284
Source Link
osman
  • 684
  • 6
  • 16

How to create search indexes by path in Drupal 8?

For a relatively small Drupal 8 website, I need to enable a search box, with multiple indexes based on the path or menu value.

For example; the main menu has 2 menu items linking to basic pages: Employers and Employees, and rest of the website pages are created under these two pages, and each page has a menu item with matching hierarchy.

  • Employers
    • Section A
      • Sub-section A-1
      • Sub-section A-2
      • Sub-section A-3
    • Section B
      • Sub-section B-1
    • Section C
      • Sub-section C-1
      • Sub-section C-2
  • Employees
    • Section D
      • Sub-section D-1
      • Sub-section D-2
    • Section E
      • Sub-section E-1
      • Sub-section E-2
      • Sub-section E-3
      • Sub-section E-4
    • Section F
      • Sub-section F-1
      • Sub-section F-2
      • Sub-section F-3

I need to be able to search only in Employers or Employees. And the search results must be limited to those indivual landing pages.

Thoughts?