[TYPO3] TSFE.constants in Typo3 ver. 4.1.5
Anders Kongsted
typo3 at kongsted.dk
Sun Jan 6 20:13:23 CET 2008
Hi Christopher,
I have the code from here:
http://typo3.org/documentation/document-library/references/doc_core_tsconfig/4.0.0/view/1/3/#id2800466
If I read the description for "constants", I can't see your point in our
second reply? Or i'm I wrong? If so, please send a link, where I can
read some more... :)
//Anders Kongsted
Christopher Torgalson skrev:
> Hi,
>
> On Jan 6, 2008 6:57 PM, Anders Kongsted <typo3 at kongsted.dk> wrote:
>
>> Hi,
>>
>> Greate someone is awake.... :)
>>
>> But even with the correction, it doesn't work. All my menu options is
>> still black... :(
>>
>> //Anders Kongsted
>>
>> Dmitry Dulepov [typo3] skrev:
>>
>>> Ji!
>>>
>>> Anders Kongsted wrote:
>>>
>>>
>>>> I can't get TSFE.constants to work.
>>>> On one of my pages I have in my TS:
>>>>
>>>> TSFE.constants.websiteConfig.siteColor = #119911
>>>>
>>>>
>>> Side note for other readers: this is in TSConfig.
>>>
>>>
>>>
>>>> And in my template I have:
>>>>
>>>>
>>> ...
>>>
>>>
>>>> backColor = ${websiteConfig.siteColor}
>>>>
>>>>
>>> ...
>>>
>>>
>>>> But the color doesn't change - it's black (#000000).
>>>>
>>>> Any solutions? :)
>>>>
>>>>
>>> According to docs correct syntax is:
>>>
>>> backColor = {$websiteConfig.siteColor}
>>>
>
>
> A number of problems:
>
> 1. Incorrect syntax in the TS template
>
> [as noted by Dmitri]
>
>
> 2. Declaration does not match call
>
> [i.e. "TSFE.constants.websiteConfig.siteColor" is different from
> "websiteConfig.siteColor"--it should NOT be different; if you check
> the TSref, you'll see that constants are replaced by simple
> str_replace (1), so if one is different from the other, no replacement
> can occur]
>
>
> 3. You appear to have entered some part of your TS in the wrong field!
>
> [Quoting: "Side note for other readers: this is in TSConfig." This is
> wrong. TS constant declarations belong in the "Constants" field of the
> TEMPLATE record, not in the TSconfig field of the page or user record.
> Similarly, your actual TS objects belong in the "Setup" field of the
> template record]
>
>
>
More information about the TYPO3-english
mailing list