Autor Subiect: Convertirea valorilor de tip TEXT în valori de tip string  (Citit de 501 ori)

vundicind

  • Novice
  • *
  • Mesaje postate: 8
Convertirea valorilor de tip TEXT în valori de tip string
« : Decembrie 29, 2009, 01:32:52 pm »
Salut! Astăzi am încercat să schimb fragmentul de cod A pe fragmentul B. Dar nu mia reușit :-(
Am înțeles că problema este în aceea că config.htmlTag_setParams este de tip string, iar
htmlTagParams de tip TEXT. Cum aș putea converti valoarea htmlTagParams în string?

Fragmentul A:

[globalVar=GP:L=0]
config.htmlTag_setParams = xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en"
[end]

[globalVar=GP:L=1]
config.htmlTag_setParams = xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr-FR" xml:lang="fr"
[end]


Fragmentul B:
htmlTagParams.10 = TEXT
htmlTagParams.10.value = xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="eng"
htmlTagParams.10.lang.fr = xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr-FR" xml:lang="fr"

config.htmlTag_setParams < htmlTagParams.10

tiberiu

  • Novice
  • *
  • Mesaje postate: 209
    • http://www.arobs.com
Răspuns: Convertirea valorilor de tip TEXT în valori de tip string
« Răspuns #1 : Decembrie 30, 2009, 09:57:31 pm »
Salut,

Nu poti sa faci asa ceva. Uita-te in sursa cum e generat doctype-ul :

       // Begin header section:
00464                 if (strcmp($GLOBALS['TSFE']->config['config']['htmlTag_setParams'],'none'))     {
00465                         $_attr = $GLOBALS['TSFE']->config['config']['htmlTag_setParams'] ? $GLOBALS['TSFE']->config['config']['htmlTag_setParams'] : t3lib_div::implodeAttributes($htmlTagAttributes);
00466                 } else {
00467                         $_attr = '';
00468                 }
00469                 $GLOBALS['TSFE']->content.='<html'.($_attr ? ' '.$_attr : '').'>';

http://typo3.org/fileadmin/typo3api-4.0.0/dd/d71/class_8tslib__pagegen_8php-source.html

Eu cred ca 'htmlTag_setParams' e o configurare typoscript pentru care ".10" nu are sens, pentru ca nu se parseaza mai departe. Valoarea 'htmlTag_setParams' e luata 'As it is'.

Are cineva alta parere?

Tiberiu Contiu
PHP System Architect
AROBS Transilvania Software
str. Minerilor, nr. 63, Cluj-Napoca

www.arobs.ro , www.arobs.com

E-mail: tiberiu.contiu(at)arobs.com , tiberiu.contiu(at)yahoo.com
Skype:  tiberiu.contiu