Show Name of Matching Person Then Highlighted Result
See original GitHub issueHey all,
So what I’m trying to do is have a search on my site that searches through users. It’s supposed to search through a lot of attributes (about 10-12) and it’s supposed to return matched users links to their profile using the hit item’s {{username}}
such as <a href="mywebsite.com/{{username}}>{{name}}</a>
What I’d like is that first part <a href="mywebsite.com/{{username}}>{{name}}</a>:
and then it would return the matched result
So part of my query might be searching for a movie credit for instance, where we would have something like this value in the backend The Incredible Hulk, Co-Star, Steven Spielberg, Film
So If I queried for “Hulk”, I would want it to show, <a href="mywebsite.com/{{username}}>{{name}}</a>: The Incredible _Hulk_, Co-Star, Steven Spielberg, Film
.
Edit: Hulk in the above was supposed to be italicized
I just don’t know quite how to access the matched term
Thanks, I appreciate all you’ve done, this was the easiest setup for search that I’ve ever used
- Zach
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
Here’s my current setup: https://jsfiddle.net/frpb3ez4/1/
Where do I put that? Can I use if’s after item: ? I didn’t think I could because it accepts an array