[TYPO3-templavoila] Get TV Content

Freddy Tripold freddy.tripold at tlog.at
Wed Apr 3 10:35:17 CEST 2013


No idea?
Can anyone tell me how TV handles multilang content?

Am 27.03.2013 20:17, schrieb Freddy Tripold:
> Hi guys,
>
> in the extension jfmulticontent and on some places in the net there is a
> function to get the content from a TV page.
> You can find it here
> http://www.merec.org/typo3/inhalt-von-anderer-seite-mit-typo3-und-templavoila,
> sorry for german I found no english one.
> Within the default language all works fine. But with another language
> the function selects from the table "pages_languages_overlay" and wants
> to convert the data into an array. But there is no field
> "tx_templavoila_flex" in the table pages_languages_overlay?
>
> Has anyone an idea how this function should work with alternate
> languages? There is no information about the TV-elements in the table
> "pages_languages_overlay".
>
> <snip>
> public function displayTemplaVoilaContent($content, $conf) {
>          //Enable stdWrap for userFunc params
>          $page_id = $this->cObj->stdWrap($conf['page_id'],
> $conf['page_id.']);
>          $field_name = $this->cObj->stdWrap($conf['field_name'],
> $conf['field_name.']);
>
>          $row = NULL;
>          if($GLOBALS['TSFE']->sys_language_content) {
>              $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',
> 'pages_language_overlay', 'deleted=0 AND hidden=0 AND pid=' .
> intval($page_id) . ' AND sys_language_uid=' .
> $GLOBALS['TSFE']->sys_language_content, '', '', 1);
>              $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
>          }
>          if(!is_array($row)) {
>              $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages',
> 'deleted=0 AND hidden=0 AND uid=' . intval($page_id), '', '', 1);
>              $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
>          }
>
>          //Convert TemplaVoilas XML to array
>          $tv_flex_config =
> t3lib_div::xml2array($row['tx_templavoila_flex']);
>
> </snip>
>
> br
> Freddy
>


-- 
Freddy Tripold
http://www.tlog.at


"When you discover that you are riding a dead horse, the best strategy 
is to dismount."
(The tribal wisdom of the Dakota Indians)


More information about the TYPO3-project-templavoila mailing list