Problem/Motivation
When you create a UI you can place it as a block on the website.
However, it would be nice to add a static route to the search on which the search UI appears.
It could work like this:
![]()
When the user checks a box, a route is provided. This could be a static route like /search-api-decoupled/{endpoint_name}. The route should be displayed, when the checkbox is active, ideally as a link that opens in a new window.
Using page URL aliases, any path can be configured for the search.
The same permissions as for accessing the endpoint could apply.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Screenshot 2024-08-20 at 13.27.36.png | 64.67 KB | a.dmitriiev |
| UI-elements-for-Default-endpoint-Try-Drupal.jpg | 140.63 KB | breidert |
Issue fork search_api_decoupled-3468145
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
breidert commentedComment #3
breidert commentedComment #4
breidert commentedComment #7
a.dmitriiev commentedThe new checkbox was added to "UI Elements" page of endpoint:
If this checkbox is checked, the page
/search-api-decoupled/{search_api_endpoint_machine_name}is available with the block "Search API Endpoint". As it is a normal Drupal page it is also possible to place other blocks on this page.Comment #8
breidert commentedI tested it and it works fine. I made a small change to the description of the toggle, so users can easily find the search page.
Comment #9
a.dmitriiev commented