3

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.

4

1 回答 1

4

你真的需要一个typolink viewhelper,还是你也可以使用uri.page viewhelper?

uri.page 查看助手:

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

或内联符号:

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

您必须嵌套一个数组以通过以下方式实现 tx_solr[filter][0]:

filter: {0: 'result_type_filter:award'}
于 2019-03-07T14:30:25.530 回答