[TYPO3-Solr] Dynamic solr link based on page TypoScript Configuration

Robert W rewebit at gmail.com
Tue Sep 23 12:53:34 CEST 2014


I am trying to call a user function which will provide either:
1) the  typolink.parameter with a page number 
or
2) the full <a> tag as required when invoking  typolink.parameter.userFunc

I have tried various ways and nothing seems to be working. Is it possible with the solr extension to use a userFunc? Does anyone have a working example?


At the top of the setup.txt for solr I have:
-----
includeLibs.user_solrurl = EXT:ams_lib/solr/user_SolrUrl.php

plugin.tx_solr {
-----


Where the URL is built for the document being indexed the code looks like this:
-----
 // build the URL through typolink, make sure to use returnLast = url
		            url = TEXT
		            url {

		            	// set this to the detail page for children
		                typolink.parameter = USER
		                typolink.parameter.userFunc = user_solrurl->user_build_url


		                //typolink.additionalParams = &tx_amsarticles_articles[tx_amsarticles_articles]={field:uid}&L={field:__solr_index_language} 
		                typolink.additionalParams.insertData = 1
		                typolink.returnLast = url
		                typolink.useCacheHash = 1
		            }

-----


More information about the TYPO3-project-solr mailing list