Feature #34381
closed
Conditional branch for TSFE:config not working
Added by Gabriel Kaufmann / Typoworx NewMedia over 12 years ago.
Updated over 9 years ago.
Description
This is feature request for having the possibility to make TS-Conditionals for TSFE:config.
Please also see BugTrack #14665 (reported as "Bug" there) also shows the need for this feature.
Example Code
@
- EXAMPLE 1
- Switch for sys_language may be mopre useful sometimes
- than using GP:L
[globalVar = TSFE:config|sys_language_uid = 1]
... Code for LANG-Setup ...
[end]
- EXAMPLE 2
- Switch for realURL
[globalVar = TSFE:config|tx_realurl_enable = 1]
... Include something if realUrl is enabled ...
[end]
- EXAMPLE 3
- Custom Switch...
[globalVar = TSFE:config|tx_myscript_enable = 1]
page.includeJS.myScript = ...
[end]
@
I think this feature would be worth implementing it.
Please note that the following code works!
@
- THIS CORRECTLY RETURNS THE DOKTYPE-STRING
- SET in TS:config.doctype
config.doctype = xhtml_trans
page = PAGE
page.10 = TEXT
page.10.data = TSFE:config|config|doctype
@
Update: Small mistake,...
The example-code to access "config" should have looked like this:
[globalVar = TSFE:config|config|sys_language_uid = 1]
...
[end]
(missing "|config" inside the condition)
Best regards
Gabriel
- Assignee deleted (
Michael Stucki)
Please don't assign an issue to someone; this will block other to work on it. If Michael agreed to take care of this issue, please mention this in the description somewhere.
On the subject: this is very likely not going to work. Conditions are processed before the rest of the TypoScript is parsed. If you want to use TypoScript settings in a condition this would mean extra parsing before the conditions can be processed. This could go on and on if values in conditions are changed by code inside a condition block.
Jigal van Hemert wrote:
> Please don't assign an issue to someone; this will block other to work on it. If Michael agreed to take care of this issue, please mention this in the description somewhere.
>
> On the subject: this is very likely not going to work. Conditions are processed before the rest of the TypoScript is parsed. If you want to use TypoScript settings in a condition this would mean extra parsing before the conditions can be processed. This could go on and on if values in conditions are changed by code inside a condition block.
Thanks for your feedback. The assignment was a mistake. Thank you for the hint.
Well I didn't know that the Typoscript is processed after conditions. Wouldn't it make sense to enable parsing for the "config"-block only? I don't think that parsing would cause too much overhead?
- Status changed from New to Needs Feedback
- Target version deleted (
4.6.5)
Hi,
as this issue is very old. Is this feature still missing in newer versions of TYPO3 CMS (6.2.9)?
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Also available in: Atom
PDF