-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap the plain breadcrumb in a span so themes can work properly and matches core approach #12
Comments
Even after applying the PR, when you do a search by filling in the search box instead of clicking a facet, and there is only one item, the last item is still not wrapped in $breadcrumb[] = $active_items ? l($keys, current_path(), array('query' => $query)) : '<span>' . check_plain($keys) . '</span>'; |
This fix, btw, is only needed by Basis. Seven and Bartik both shows the last child correctly. The problem is that Basis doesn't provide the full needed css styling to the |
If that's so then that's also true of |
You may be right that it's up to Basis to fix this. Though I think you've got it backwards. Basis provides styling to |
What I meant is that:
So, rather than wrapping the last child as in Then again, perhaps wrapping the text in I guess another option is to add a configuration form where the user can specify the markup to wrap the unlinked last breadcrumb. But this may be overkill if the above is harmless. |
BTW, did you see my comment aboe? If we' be decide to wrap that last breadcrumb in span, there is one more place where that needs to be done. |
Yes, I saw that, though I now am thinking of doing something like this, after you mentioned it is only needed for Basis:
I'll put it in my child theme, but it could also go into Basis. That way it leaves other themes and modules untouched. |
Actually, now I've changed my mind. In core there is this:
So this is getting output regardless of theme. So I think we can do the same here too. I just need to update my PR to account for both cases you mention @argiepiano |
@argiepiano I've updated the PR to also add a |
Interesting! I knew I had seen this ability to enable/disable showing the current location somewhere! So, now we have an interesting problem. When I enable that functionality in the breadcrumb block, we end up with two breadcrumbs that are not links - this may be confusing, but I guess this is beyond the scope of this issue. I'll do more testing later, but so far WFM |
Yeah, that's what I was alluding too. Beyond the scope of this issue. (Maybe Facet shouldn't be putting them in the breadcrumb at all?) |
I really like the way Facet API adds those breadcrumbs. It allows you to "undo" the facetted search one term at a time. I also think that site builders can disable the last breadcrumb added by the breadcrumb block. And if they want to get fancy, they can add two breadcrumb blocks, one with the last breadcrumb and another without, and use a URL path visibility condition to use the disabled one in the search pages. So... this LGTM and RTBC! |
When clicking on a facet it will add the filter name to the end of the breadcrumb. Currently it looks like this with core's Basis theme:
Core will wrap a plain breadcrumb (no link) in a
<span>
. But facetapi will leave it plain. But this should probably be wrapped in a<span>
so themes can target it properly so it looks like this:The text was updated successfully, but these errors were encountered: