[TYPO3-UG Denmark] Hjælp til "Search In Tables" extension

Hasse Nielsen hasse.nielsen at gmail.com
Wed May 16 14:39:29 CEST 2007


Hej,
jeg prøver at få "Search In Tables# (fesearchintable) konfigureret så det bliver muligt at søge både i tt_news og i de enkelte sider på sitet.
Men det er virker ikke rigtigt...

Når jeg laver en søgning resulterer det i:
Search for email
Sorry, no items were found.

Og jo, der er en artikel med ordet "email" ;-)

Er der nogen der kan hjælpe ?

Jeg har installeret "Search In Tables" under extensions
På søgesiden har jeg indsat "Search In Tables" som plugin og sat feltet CODE: til both, for at vise både et søgefelt og resultatet.
Jeg har ikke indsat andet på siden.

Jeg har indsat følgende typoscript i "Setup:" for søgesiden:
--------------------------------------------------------------------------------------------------------
### SEARCH IN TABLES ###

plugin.tx_fesearchintable_pi1 {

   debugRecordFields = 0
   CMD = {$plugin.tx_fesearchintable_pi1.CMD}
   Limit = {$plugin.tx_fesearchintable_pi1.Limit}
   backLink = 0
   backWrap = <div align="center">|</div>
   
   form = FORM
   form.dataArray {
           10.label.data = LLL:EXT:fesearchintable/pi1/locallang.php:label.search
           10.label.wrap = |:
           10.type = sword=input,30
           20.type = submit=submit
           20.value.data = LLL:EXT:fesearchintable/pi1/locallang.php:label.search
           }
       form.type = {$plugin.tx_fesearchintable_pi1.resultsPID}
       form.locationData = 1
       form.layout = <td>###LABEL###</td><td> ###FIELD###</td>
       form.labelWrap.wrap = <strong>|</strong>&nbsp;&nbsp;
       form.stdWrap.wrap = <table cellspacing="2" cellpadding="4" border="0"><tr>|</tr></table>
        form.wrapFieldName = tx_fesearchintable_pi1[|]
   
   searchAdditionalPiVarsWrap = &nbsp;with&nbsp;|&nbsp;as&nbsp;     
      
   searchTables {         
      // the developer has to set on .listItem and .singleView to tell how the extension is supposed to do the output.
      // we have to decide it here, since each table has its own table sql definition      
         
      #### TT_NEWS is provided as an example###
      tt_news = 1
      tt_news.name = News
      tt_news.fields = title,short,bodytext,keywords,author
      tt_news.pidList = 
      tt_news.recursive = 
      tt_news.orderBy = crdate DESC
      tt_news.selectAdditionalParams = AND 1=1
     
      tt_news.listHeader = COA
      tt_news.listHeader {
          10 = TEXT
          10.value = News
          10.wrap = <h3 style="background-color:#FFCC66; color:white; padding: 4px">|</h3>
       }
       
      tt_news.listItem = COA
      tt_news.listItem {
        stdWrap.wrap = <li>|</li>
          10 = TEXT
          10.field = title
          10.wrap = <strong>News: </strong><strong style='color:#006699;'>|</strong><br>
          20 = TEXT
          20.field = short//bodytext
          20.crop = 40|...&nbsp;
          30 = TEXT
          30.value = more<font size=1>></font>
          30.typolink.parameter.data = TSFE:id
          30.typolink.wrap = <strong>|</strong>
          30.typolink.ATagBeforeWrap = 1
          // we add the tx_ttnews[tt_news] var as this one is the used by the tt_news extension to recognize the uid on single view.
          30.typolink.additionalParams.dataWrap = &tx_fesearchintable_pi1[sTable]=tt_news&tx_fesearchintable_pi1[sUID]={field:uid}&tx_ttnews[tt_news]={field:uid}
          
      }
      tt_news.listStdWrap.wrap = <ol style="margin-top:-10px">|</ol>
      // 
   
      tt_news.singleView < plugin.tt_news
      tt_news.singleView.code >
      tt_news.singleView.code = SINGLE
   }

   results {
        // stdWrap functions
        headerWrap.wrap = <em>|</em><br>
        displayingWrap.wrap = |<br>
        keywordsWrap.fontTag = <font color="Red">|</font>
        tableListWrap.wrap = <ul>|</ul>
        tableListItemWrap.wrap = <li>|</li>
    }
}

--------------------------------------------------------------------------------------------------------


More information about the TYPO3-UG-denmark mailing list