After Search - Navigating to the results?
Permalink
I don't see any information in C5 docs or on the forum about how to LOCATE C5's search results. Sure, I get a nice list of all the hits but the best you can do with this information is navigate to the page where the results are found.
If you have a long scrolling page, or one with many blocks, there is no way to find the search term in the page content. Terms are not highlighted, nor is the page scrolled to the first occurrence. So you have the general location of the search term but still can't find it.
Furthermore, if the contents are within a tab or accordion, these are not opened so you have to go hunting.
Any suggestions for how to navigate to the searched content once you find it?
Has anyone scripted a solution to open a tab or accordion to show the search term underneath? I realize this may only work for one occurrence. Not sure how to deal with multiple occurrences on the same page (set of tabs).
Thanks very much.
If you have a long scrolling page, or one with many blocks, there is no way to find the search term in the page content. Terms are not highlighted, nor is the page scrolled to the first occurrence. So you have the general location of the search term but still can't find it.
Furthermore, if the contents are within a tab or accordion, these are not opened so you have to go hunting.
Any suggestions for how to navigate to the searched content once you find it?
Has anyone scripted a solution to open a tab or accordion to show the search term underneath? I realize this may only work for one occurrence. Not sure how to deal with multiple occurrences on the same page (set of tabs).
Thanks very much.
If you are combining lots of different things onto one page and those pages are really long, it could be argued that you're not breaking your site down enough into individual pages, especially if you feel people are going to be searching to find particular records.
With a few sites we've built we've made it that each specific 'resource' has its own page, but the individual resource pages aren't heavily linked in - we use page lists to generally summarise and output the information. If however, someone searches for something specific, the individual pages are output the search results and they'll get a direct link to a page with only the information the are after. It's a finer grained page.
For example, you might have a website to list cars for sale. You might have a handful of categories to list cars, with the summary of cars displayed on each category page displaying all the details. Each car would be it's own (composer driven perhaps) sub page under that category. If someone searched for a particular car, they could click through to an individual car page, rather than having to hunt through a list of cars for the one that matched their search. You also then get the benefit of a unique url, for people to send to others, as well the ability to track each car via the date it was added, sort, etc. (then you've also got the whole benefit of using pages and attributes to manage data, but that's not my main point here)
I've only seen a few cases where it actually scrolls you down to the instance of the keywords, I think those were on academic resources where you might be searching through a long journal or book. Google, etc, just give you results that link to pages - they don't do some trick to show you on the page where your keyword matched.
In terms of what concrete5 stores for searching, it simply doesn't store individual keywords and their locations - it just has a big lists of pages with their search text, and it matches it that way. There's nothing in the database to say 'beer in on this page, on the second paragraph, third word'.
There might be some jQuery script out there that you could use that you integrate with your site that highlights what you originally searched for. Perhaps something like this:
http://bartaz.github.io/sandbox.js/jquery.highlight.html...
You'd have to pass through to the page the text that was searched for when linking through to the page. A decent amount of custom coding to get this working right.
On the other hand there is perhaps a little bit of responsibility on the end user to have some skills in using their browser, i.e. finding something on a page with Ctrl+F. Page search is there for a reason.
To address your second question, I'd politely suggest that hiding contents within tabs or accordions is a broader usability issue - is it worth considering a different approach anyway?