[TYPO3-Solr] Solr CONTENT object not working

Bas van der Togt bas at profinit.com
Wed Dec 17 12:38:55 CET 2014


This fixed my problem:

...
renderObj = TEXT
						renderObj {
							typolink.parameter.cObject = COA
							typolink.parameter.cObject {
								10 = TEXT
								10.data = field:single_pid
								10.if.isTrue.field = single_pid

								20 = TEXT
								20.value = {$page.id.faq.default}
								20.if.isFalse.field = single_pid
							}

							typolink.additionalParams.cObject = COA
							typolink.additionalParams.cObject {
								10 = TEXT
								10.value = 
&tx_example_frequentlyaskedquestions[controller]=Question&tx_example_frequentlyaskedquestions[action]=categoryDetail&tx_example_frequentlyaskedquestions[category]={field:category}
								10.value.insertData = 1
								10.if.isFalse.field = single_pid
							}

							typolink.section = q{field:uid}
							typolink.section.insertData = 1
							typolink.useCacheHash = 1
							typolink.returnLast = url
						}
...

regards,
Bas



Bas van der Togt schreef op 16-12-14 16:36:
> Hello!
>
> I wrote a configuration to index my custom table. The url is based on
> the related sys_categories (first category only).
>
> My configuration:
>
> plugin.tx_solr {
>      index {
>          queue {
>              tx_example_domain_model_question = 1
>              tx_example_domain_model_question {
>                  table = tx_example_domain_model_question
>
>                  fields {
>                      title = question
>
>                      content = answer
>
>                      category_stringM = SOLR_RELATION
>                      category_stringM {
>                          localField = categories
>                          multiValue = 1
>                      }
>
>                      url = CONTENT
>                      url {
>                          table = tx_example_domain_model_question
>                          select {
>                              selectFields =
> tx_example_domain_model_question.uid, sys_category.single_pid,
> sys_category.uid category
>                              leftjoin = sys_category_record_mm ON
> sys_category_record_mm.uid_foreign =
> tx_example_domain_model_question.uid LEFT JOIN sys_category ON
> sys_category.uid = sys_category_record_mm.uid_local
>                              pidInList = {$page.id.faq.storage}
>                              recursive = 1
>                              where.field = uid
>                              where.wrap =
> tx_example_domain_model_question.uid = |
>                              orderBy = sys_category.sorting ASC
>                              max = 1
>                          }
>
>                          renderObj = TEXT
>                          renderObj {
>                              typolink.parameter.cObject = CASE
>                              typolink.parameter.cObject {
>                                  key.field = single_pid
>
>                                  0 = TEXT
>                                  0.value = 15
>
>                                  default = TEXT
>                                  default.field = single_pid
>                              }
>
>                              typolink.additionalParams.cObject = CASE
>                              typolink.additionalParams.cObject {
>                                  key.field = single_pid
>
>                                  0 = TEXT
>                                  0.value =
> &tx_example_frequentlyaskedquestions[controller]=Question&tx_example_frequentlyaskedquestions[action]=categoryDetail&tx_example_frequentlyaskedquestions[category]={field:category}
>
>                                  0.value.insertData = 1
>
>                                  default = TEXT
>                                  default.value =
>                              }
>                              typolink.section = q{field:uid}
>                              typolink.section.insertData = 1
>                              typolink.useCacheHash = 1
>                              typolink.returnLast = url
>                          }
>                      }
>                  }
>              }
>          }
>      }
> }
>
> However it looks like i don't receive the uid in the select.
> When i set the uid to a static value, for example 1, it works.
> What am i doing wrong?
>
> Regards,
> Bas



More information about the TYPO3-project-solr mailing list