Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Breadcrumbs on Search Results Screen

@uniquepete

Participant

Thanks Robin. That’s given me something to work with.

As it stands, this will include the current forum in the breadcrumb if the search is executed from a specific forum and the result set is not empty. That is certainly one of the cases addressed.

But if the search is executed from the main index page, and the result set is not empty, instead of the breadcrumb trail including just Forums > Search > etc., it will include the name of the the first forum that produced a search hit (and obviously not all, where there may be several hits in different forums), which is not really the intent.

If the search set is empty, however, the name of the forum from which the search was conducted is still missing and I’m not sure I can work out how to get around that, because your code is using one of the search hits to work out what forum to add to the breadcrumb. If the search set is empty, how then can I work out where I’ve come from? I think I’m going to have to know this to even fix the first problem above.

Is there a concept of something like a global variable here? Can we set the $forum_id variable any time we navigate to a particular forum and just call on that from where ever we are if needed?

I think it will be the case of the empty search where this will come in most handy, because the reader can quickly flick back to the forum in question and search again, rather than having to go back to the main index page and navigate back to the forum they were working with if they, for example, have just mistyped a search string.

Thanks again. I had no idea where to even begin…

Skip to toolbar