how to construct this solr parameters with uri.typolink

netzding

how does it work if i want to construct following structure with Typo3's Fluid uri.typolink viewhelper:

/de/suche/?tx_solr[q]=&tx_solr[filter][0]=result_type_filter:award

this is the viewhelper and data should go inside additionaParams, if im not wrong. {f:uri.typolink(parameter: 2881, addQueryString: 1, additionalParams: 'structureGoesHere')}

example:

{f:uri.typolink(parameter: 2881, addQueryString: 1, additionalParams: 'example')}

output:

/de/suche/?tx_solr%5Bq%5D=&example=

decoded:

/de/suche/?tx_solr[q]=&example=

im stuck the hard way... just using typo3 for the first time trying to wrap my head arround everything, any help is much appreciated.

further explanation: (typo3, fluid, solr) you might ask yourself why do i need this specific structure... we reworked our solr facet architecture - first we used "top nav" buttons were we filtered results per page config - now we replaced this approach with facets for the counter of the specific facets in the top nav - so now we have to pass the correct facet as parameter to know which results to display on reload (ajaxify does not work in this situation, its just for the side menu). this is were the uri.typolink approach finds use.

Mikel Wohlschlegel

Do you really need a typolink viewhelper, or could you also use the uri.page viewhelper?

uri.page viewhelper:

<f:uri.page pageUid="2881" additionalParams="{tx_solr: {q: '', filter: {0: 'result_type_filter:award'}}}" />

Or inline notation:

{f:uri.page(pageUid:'2881', additionalParams: '{tx_solr: {q: \'\', filter: {0: \'result_type_filter:award\'}}}')}

You have to nest an array to achieve tx_solr[filter][0] by:

filter: {0: 'result_type_filter:award'}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to construct a URI with parameters using URIBuilder?

How to construct akka TestFSMRef with parameters?

How convert URI parameters into JSON

Autohotkey: How to construct dynamic parameters to call a function

How to construct case classes conditionally based on their parameters?

How to construct a MethodType for a method with variant parameters

How to construct URL for Google API with query parameters

asyncpg: How to construct SET strings with parameters

How do you construct a solr query to query a particular datasource?

How to construct a URI for running an executable JAR to run on AWS

How to construct URI with query arguments from hash in Ruby

How to construct a Uri whose baseaddress is the current domain it is deployed in?

How to add new parameters to solr query responses

How to customize URI in Scrapy with non built in storage URI parameters

How to pass parameters to ansible uri module?

How to access parameters in a redirect URI in Flask?

How to construct multipart form-data request with [String: Any] parameters

How do I construct a sql in GO MYSQL with many similar parameters?

How to construct a raw SQL Query in EF Core with dynamic number of parameters

Typolink with text

solr local parameters not recognized

how to use URI templates to change path parameters in a URL in java

How to read URI Parameters using HttpContextAccessor in ASP.NET Core

How to define URI pattern for a GET request with multiple parameters of the same type

How to use both a uri and passed in parameters for a linked template?

Freya - How to define a Uri Template with Optional Query String Parameters

How to get an associative array from URI path parameters?

Construct a URL with Request Parameters in Java

Symfony 3 createForm with construct parameters