Home › Forums › MapPress Support › Problems using Views (Toolset) with Mappress
- This topic has 3 replies, 2 voices, and was last updated 8 years, 1 month ago by
Chris.
-
AuthorPosts
-
March 7, 2014 at 5:12 am #14368
notmadein
ParticipantHello Chris ,
I use Mappress and Views (Toolset plugin) together to make an agencies search engine on a multilingual site. “Views” allows me to make the search/filter form. There are a few months Toolset support team helped me to develop a piece of code that allowed to pass the query from Views to Mappress. It works well. However since the latest updates of your plugins, when no research is performed, Mappress displays Fr and Uk agencies points and links on the map and the Poi List. If you filter the points using the checkboxes (services) or the select box (locations) Mappress displays the points in the right language. Is there a way to initialize Mappress when the page load to display only the datas relative to the site language ?
You can see the page here:
http://dev.ortec.notmadein.fr/agences/ortec-services-aix-en-provence/My discussions with Toolset support team on their forum.
1 – http://wp-types.com/forums/topic/toolset-views-and-mappress/ ( 06/19/13 )
2 – http://wp-types.com/forums/topic/passing-a-query-between-views-and-mappress/ (13/02/14)Thank you for your help.
March 7, 2014 at 6:30 am #14371Chris
KeymasterHi,
I don’t know the details of your system, but it looks like the query you are sending after selection includes a taxonomy query against taxonomy ‘localization’.
Perhaps you could include that taxonomy in the initial query. This is what is send now (for France):
tax_query":{"relation":"AND","0":{"taxonomy":"localisation","field":"id","terms":["290"],"operator":"IN"}} ...
If your initial query is created using PHP you can add the taxonomy to it. See the WP_Query documentation:
http://codex.wordpress.org/Class_Reference/WP_QueryIf it’s a shortcode, I think it will be difficult. You can include a taxonomy in the shortcode but there’s no way to default it based on the user’s locale:
[mashup query=”post_type=any&posts_per_page=-1&localisation=290″}
March 28, 2014 at 4:44 am #14453notmadein
ParticipantHello Chris,
OnTheGoSytem teams (Toolset) have found a solution, by adding to “mappress_query.php” file at line 110
$ query ['suppress_filters'] = false;
Think you can add it in a future release of the plugin?
This will allow to operate Mappress with filters in Toolset (Types and Views).Thank you very much.
March 28, 2014 at 6:25 am #14454Chris
KeymasterHi,
Thanks for the update. I don’t know if it makes sense to modify MapPress for this, since most users don’t wish to disable query filters.
For your queries, though, you should be able to just include that parameter in your query string:
[mashup query="suppress_filters=true"]
Or if you’re using a PHP array for the query:
$query['suppress_filters'] = true;
-
AuthorPosts
- You must be logged in to reply to this topic.