[TYPO3] TypoScript doubt
Antonio Álvarez Feijoo
aalvarez at igalia.com
Fri Jun 6 09:58:02 CEST 2008
Hello,
I'm forwarding this e-mail from the TYPO3-project-obts mailing list.
My problem is that I want to load the path of the CSS to use at one
concrete page dynamically using TypoScript, but when I use a postUserFunc
this doesn't work. Example:
temp = TEXT
temp.value = fileadmin/templates/css/mycss_es.css
temp2 = TEXT
temp2.value = fileadmin/templates/css/mycss
# PHP function that add "_es.css" to .value
temp2.postUserFunc = user_module->suffix
# The output is the same and is showed right...
page.15 < temp
page.16 < temp2
# If I do this, the page catches CSS
page.includeCSS {
file1 < temp.value
}
# But, instead of the previous, if I do this the page doesn't catch CSS
page.includeCSS {
file1 < temp2.value
}
I don't want a userFunc for including CSS. I only want the path in a TEXT
cObject. I use the userFunc to modify the base path, adding one suffix for
one CSS or other depending of the language.
temp2 = TEXT
temp2.value = fileadmin/templates/css/mycss
# PHP function that add "_es.css" to .value
temp2.postUserFunc = user_module->suffix
I think that this is more comfortable when you have to add new languages
to the website with a specific CSS, than go through the contents tree
searching and adding:
[globalVar = GP:L=1]
page.includeCSS.file1 = fileadmin/templates/css/mycss.css
[globalVar = GP:L=2]
page.includeCSS.file1 = fileadmin/templates/css/mycss_es.css
[...]
Any idea?
Regards.
--
Antonio Álvarez Feijoo
Computer Science Engineer
mailto:aalvarez at igalia.com
Tel: +34 986 10 76 10
Fax: +34 981 91 39 49
Igalia - http://www.igalia.com
More information about the TYPO3-english
mailing list