TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

TYPO3 Mailingliste: nicht fragen - lesen!

TYPO3 Mailingliste: nicht fragen - lesen!_RR_1-->
Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-project-templavoila@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 20.04.2007, 12:53
Anders Tillbeck
Gast
 
Beiträge: n/a
Standard [TYPO3-templavoila] How to access a translated page title inextension?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 20.04.2007, 13:02
Dmitry Dulepov
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-templavoila] How to access a translated page title inextension?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 20.04.2007, 13:21
Anders Tillbeck
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-templavoila] How to access a translated page title inextension?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 20.04.2007, 14:48
Dmitry Dulepov
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-templavoila] How to access a translated page title inextension?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

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


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:32 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Template-Modifikationen durch TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77