Closed (fixed)
Project:
Views navigation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 May 2013 at 06:22 UTC
Updated:
12 Aug 2013 at 11:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
gaëlgAs mentioned in the Readme file, the module currently only handles the default query plugin. I might add search API integration if I need it someday. Meanwhile, I'll review any patch on this feature request.
Comment #2
ada05 commentedok. sorry i missed that or didnt quite understand "default query plugin" (-> pretty new to drupal)
thanks for the reply & kudos on the module!
Comment #3
gaëlgI'm on it, should be released soon.
Comment #4
gaëlgDone and released as 1.1.
Comment #5
lunatic commentedGreat news !!
I have trying myself to find some time to work on this issue
I had done some digging around and had "almost" a semi-functional version
Here is a patch with an alternative approach that I used on the views_navigation_get_result part
It may save some time and resources this way, although I haven't done any bench-marking
Comment #6
gaëlgI think range() is needed to ensure we get all the results with no pager limit. And the query has to be executed before we can call getSearchApiResults(): http://drupalcontrib.org/api/drupal/contributions!search_api!contrib!sea...
Comment #7
ada05 commentedHi,
Really great that you found time to work on this and extend it!
I updated the module, activated it in the view and associated a node type with the prev/next block.
The query-xxxx entries are added to the cache - However, the links are not displaying (no GET parameters generated)
I am using the SolrSearchAPI module to generate the views. Will try to investigate - maybe you have some pointers of what would have to be changed in my setup?
Comment #8
gaëlgYou probably use field handlers that are not yet supported by the module. A simple title field with a link to the node does not work? Do you use Search API Solr or DB?
Try to add some dpm() at strategic points of the module's code to see what happen. For example, in the 7 field handler files in views_navigation/views: if your field is supported, it should output something. The list of supported field handlers is in views_navigation_views_data_alter().
Comment #9
lunatic commentedMaybe there could be an option (for any supported field) that would return the "crafted" link as simple/raw value so it can be used as replacement on any other field ?
Comment #10
gaëlgGood idea. I probably won't work on it soon, but you can open a feature request, and try to do it if you want/can. I guess the main difficulty is to find the right API way to create this views token.
Comment #11
ada05 commented@GaëlG: thanks for the hint! again: reading is key - i overlooked this info in the README.
at the moment, i am using a rendered entity - will look for a workaround - great module!-works like a charm. sorry for not reading thoroughly :)
Comment #12
mpv commentedGreat to see support for Search API. However I am getting an error with a Search API views:
If I change
$nids[] .= $result->entity;to$nids[] = $result->entity;the error goes away but we are still adding objects to an array that is supposed to have strings. Thenarray_searchreturns FALSE and vnp is always 0.I've tried getting the entity id with
entity_extract_ids()but the entity type is not always available. I am willing to write a patch for this but I need some directions in how we could get the entity id here.Comment #13
gaëlgDo you use Search API DB? I only tested my code with Search API Solr, and $result is like this:
So that $result->entity is an integer which can be converted to a string.
Can you enable Devel module and place a dpm($result, 'result') in the code to see how your $result variable is built?
Comment #14
mpv commentedYes, I am using Search API DB. This is what I have in $result.
$result->entity is always the full entity (node in my case). Anything else I can do?
Comment #15
gaëlgI see. Can you please test with this code instead:
Comment #16
mpv commentedYes, that code works. I was using something similar, but I wasn't sure about assuming the entity is a node.
Comment #17
gaëlgYes, ATM only nodes are handled. Committed to dev.