Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
20 Oct 2012 at 16:30 UTC
Updated:
8 Sep 2017 at 10:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedAttached a patch that rewrites the path. It's working for me, let me know what you think of it.
Comment #2
guillaumev commentedNew patch that works for me (maybe after a few more releases of search_api).
Comment #3
cossimo commentedI know this is an old thread, but neither of the patches worked for me. 1818572-2 is close but makes the link relative to the page on which the facets block resides, instead relative to the search page it's supposed to reference. Since all my facets blocks are on node-based pages and have a consistent url pattern, it was easy enough to alter $variables['path'] to make it work.
However, while I'm including my solution below for reference, it is ugly, brittle, short-sited and not fit for general consumption. I'm hoping there's someone out there smarter than I am, who might come up with a better solution.
C.
Comment #4
Sakhmed commentedFinally :-) #3 worked for me!
Thank you a lot!
Comment #5
drunken monkeyHm, interesting. Thanks for the input!
Maybe try to ask in the Facet API Pretty Paths issue queue for help regarding how to change the base path used? That seems to be the only missing thing here. Otherwise, you could at least determine from
current_path()how many leading path segments tounset()from the path created by the URL processor.Comment #6
dasjomaybe #2413319: Add base path provider plugins helps
Comment #7
a.dmitriiev commentedIn addition to patch #2 it would be nice to have alias for taxonomy term:
Comment #8
lodey commented#2 works well, but we can then also get to the current base path value using the getBasePath() method and then remove it from the pretty path generated by getFacetPath() method using a str_replace.
This patch works well for me.
Comment #9
lodey commentedComment #10
drunken monkeyThanks, looks good. Attached are just a few style improvements/nit-picks.
However, it would be good to get confirmation from some other people that this indeed works as intended and doesn't break anything. I don't completely understand the code and want to make sure that it works as intended for all use cases we currently support.
Comment #11
popstas commentedPatch #10 works for me, search_api 7.x-1.19
Comment #13
drunken monkeyGood to hear, thanks for testing and reporting back!
Committed.
Comment #14
cossimo commentedThe patch in #10 worked perfectly for me.
Thanks, and FYI,
C.