|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Hi.
After using the TemplaVoila to translate at site to multible languages I have now a small problem. I have made an extension that can list page titles using these fields: $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); $details['title']; But using it on a page with multible languages made using TemplaVoila my extension only selects the "real" page title and not the tranlated page title for any secondary language. How can I change the above TS to get the true translated page title instead of the default page title? BR. Anders _______________________________________________ TYPO3-project-templavoila mailing list TYPO3-project-templavoila (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-templavoila |
|
#2
|
|||
|
|||
|
Anders Tillbeck wrote:
> After using the TemplaVoila to translate at site to multible languages I > have now a small problem. I have made an extension that can list page > titles using these fields: > > $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); > $details['title']; > > But using it on a page with multible languages made using TemplaVoila my > extension only selects the "real" page title and not the tranlated page > title for any secondary language. > > How can I change the above TS to get the true translated page title > instead of the default page title? This is not depended on templavoila. You need to make this call: $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, $curLang); where $curLang is language ID (value of "L"). -- Dmitry Dulepov Web: http://typo3bloke.net/ Skype: callto:liels_bugs "It is our choices, that show what we truly are, far more than our abilities." (A.P.W.B.D.) _______________________________________________ TYPO3-project-templavoila mailing list TYPO3-project-templavoila (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-templavoila |
|
#3
|
|||
|
|||
|
Dmitry Dulepov skrev:
> Anders Tillbeck wrote: >> After using the TemplaVoila to translate at site to multible languages >> I have now a small problem. I have made an extension that can list >> page titles using these fields: >> >> $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); >> $details['title']; >> >> But using it on a page with multible languages made using TemplaVoila >> my extension only selects the "real" page title and not the tranlated >> page title for any secondary language. >> >> How can I change the above TS to get the true translated page title >> instead of the default page title? > > This is not depended on templavoila. You need to make this call: > > $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, $curLang); > > where $curLang is language ID (value of "L"). > Thanks for your fast answer ![]() I have tried: $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, 1); This writes out "Array" $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, 1); This wries out the original page title. But not the one for translation &L=1 You seem to know this well so I hope that you can see what to do different in the above two examples to get the translated title ![]() BR. Anders _______________________________________________ TYPO3-project-templavoila mailing list TYPO3-project-templavoila (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-templavoila |
|
#4
|
|||
|
|||
|
Anders Tillbeck wrote:
> Dmitry Dulepov skrev: >> Anders Tillbeck wrote: >>> After using the TemplaVoila to translate at site to multible >>> languages I have now a small problem. I have made an extension that >>> can list page titles using these fields: >>> >>> $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); >>> $details['title']; >>> >>> But using it on a page with multible languages made using TemplaVoila >>> my extension only selects the "real" page title and not the tranlated >>> page title for any secondary language. >>> >>> How can I change the above TS to get the true translated page title >>> instead of the default page title? >> >> This is not depended on templavoila. You need to make this call: >> >> $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, >> $curLang); >> >> where $curLang is language ID (value of "L"). >> > > > Thanks for your fast answer ![]() > > I have tried: > $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); > $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, 1); > This writes out "Array" > > $details = $GLOBALS['TYPO3_DB']->sql_fetch_assoc( $res_page ); > $GLOBALS['TSFE']->sys_page->getRecordOverlay('pages', $details, 1); > This wries out the original page title. But not the one for translation > &L=1 > > You seem to know this well so I hope that you can see what to do > different in the above two examples to get the translated title ![]() Both your code fragments look identically... Actually for page record you can easier approach: $GLOBALS['TSFE']->sys_page->getPageOverlay($GLOBALS['TSFE']->id, $GLOBALS['TSFE']->sys_language_uid); This will return you page record overlayed with current language. -- Dmitry Dulepov Web: http://typo3bloke.net/ Skype: callto:liels_bugs "It is our choices, that show what we truly are, far more than our abilities." (A.P.W.B.D.) _______________________________________________ TYPO3-project-templavoila mailing list TYPO3-project-templavoila (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-templavoila |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3] Change page title only to one page | Cray Flatline | typo3-english@lists.netfielders.de | 5 | 20.04.2007 04:02 |
| [TYPO3] HMENU and Access restricted page | Tyler Kraft | typo3-english@lists.netfielders.de | 0 | 19.04.2007 14:52 |
| [TYPO3-dev] End user page access,but with my own DB and Session variables? | typo3-dev@lists.netfielders.de | 0 | 02.03.2007 13:20 | |
| [TYPO3] Show the page title of the section home page | rocky Ou | typo3-english@lists.netfielders.de | 1 | 02.02.2007 08:18 |
| [TYPO3-german] Einfach Page Access Statistik | Cyrill Helg | typo3-german@lists.netfielders.de | 7 | 19.12.2006 10:17 |