[TYPO3-Solr] Dynamic solr link based on page TypoScript Configuration
Robert W
rewebit at gmail.com
Mon Sep 22 08:08:21 CEST 2014
For the dynamic link, I am having problems tying a user function to the typolink.parameter field. I created a sandbox page on the site where I can work with the TypoScript, to make sure it is functioning correctly before putting it in the actual Solr setup.txt file. It is returning a link to the TypoScript in my test page, but when I put this into the setup.txt file and try to call the user function, it is not working.
Here is what I get for the link for the indexed article:
http://<!--int_script.a07288890d76ca210bbf74a0a6f72036-->/
Here is the code that I am using to build the typolink.TEXT
url = TEXT
url {
// set this to the detail page for children
typolink.parameter = TEXT
typolink.parameter {
//field = pid
cObject = USER_INT
cObject {
// Include the PHP file with our custom code
includeLibs = typo3conf/ext/ams_lib/solr/SolrUrl.php
userFunc = SolrUrl->user_build_url
pageId=pid
articleId=uid
detailTag=plugin.ams_articles.pidDetail
}
}
typolink.parameter.field < typolink.parameter.cObject
//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