[Typo3] tx_kbcontslide -> multilanguage ?

T.Joga email at welho.com
Fri Dec 2 13:08:31 CET 2005


Hi! I am wondering how I could modify "KB Content Slide"-plugin to 
support multi-language content?
If I have translated content which I want to inherit to other documents 
and now the plugin places all content to the page, translated and not 
translated.

plugin gets content to the page via this TS:

plugin.tx_kbcontslide_pi1.content.select.where = colPos=3
temp.mainTemplate.subparts.subteaser < plugin.tx_kbcontslide_pi1

Is there possible somehow manipulate "select.where"
-> select.where = colPos=3 && config.sys_language_uid = 1

More sophistecated workaround would be to change the plugin itself to 
get data for the selected language from db.
The main-function seems pretty clean, I just dont understand how I could 
to get it work like I want:

/**
  * The "main" method
  * This method walks back the rootline and generates the CONTENT element
  * for each PID. If content is found (cObjGetSingle retunred something)
  * the loop breaks and the found content gets returned.
  */
function main($content,$conf)	{
  $this->conf = $conf;
  $this->cont = $this->conf["content"];
  $this->cont_conf = $this->conf["content."];

  $this->orig_contentPid = $GLOBALS["TSFE"]->contentPid;

  $rootLine = $GLOBALS["TSFE"]->rootLine;
  $cont_id = 0;
  while ($page = array_shift($rootLine)) {
  	$GLOBALS["TSFE"]->contentPid = $page["uid"];
  $content = $this->cObj->cObjGetSingle($this->cont, $this->cont_conf);
  if(strlen($content)) break;
  }
  $GLOBALS["TSFE"]->contentPid = $this->orig_contentPid;
  return $content;
}


Here is what $conf variable contains. Could I manipulate from here 
somehow what to select from db? Is it possible to add more conditions 
for selecting data from table?
$this->lang = $GLOBALS['TSFE']->sys_language_uid;?

/*
$conf:
Array
(
     [userFunc] => tx_kbcontslide_pi1->main
     [content] => CONTENT
     [content.] => Array
         (
             [table] => tt_content
             [select.] => Array
                 (
                     [pidInList] => this
                     [where] => colPos=3
                     [orderBy] => sorting
                 )

         )

)
*/




More information about the TYPO3-english mailing list