Feature #16525
closed"<INCLUDE_TYPOSCRIPT:" and multi level conditions
Added by Wolfgang Klinger almost 18 years ago. Updated over 4 years ago.
100%
Description
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/blub/__ts.txt"> [globalVar = GP:test = 1] <INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/plob/__ts.txt"> [global]
does not work right if there are other conditions inside /plob/__ts.txt, as there are currently no multi level conditions (one condition around other conditions) possible. So you have to handle this in the file itself (currently).
I first thought about another problem here (didn't really dig into this until now), but now I think this is a lot more work, but I'll take a look at it anyway
(issue imported from #M4150)
Updated by Michael Stucki almost 18 years ago
Please allow me to change the priority of this bug.
Updated by Michael Stucki almost 18 years ago
Assigned to myself by mistake, sorry.
Updated by Martin Holtz almost 18 years ago
[globalVar = GP:test = 1]
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/assets/tstest.txt">
[global]
works fine for me.
TYPO3 4.0.1
what does
[globalVar = GP:test = 1]
page.2000 = HTML
page.2000.value =
[global]
is ist possible that you made an other mistake?
Updated by Stefan Neufeind over 12 years ago
@core: How do we go about this? There are no multi-level conditions planned one way or the other. And if you have conditions in external files that for sure gets tricky.
Looking at the age of this ticket, should it maybe be closed wont-fix?
Updated by Thorsten Kahler over 12 years ago
- Category deleted (
Communication) - Status changed from Accepted to Needs Feedback
- Assignee deleted (
Wolfgang Klinger) - Target version deleted (
0) - PHP Version deleted (
4) - Complexity set to nightmare
+1 for wont-fix
The only way to fix that would be nested conditions which we can't realize in TS 1.0: every inclusion of a TS snippet, via DB relation or <INCLUDE_TYPOSCRIPT...>
, adds an implicit [global]
to the end of that snippet to make sure that all conditions are working only locally. Changing that would surely be breaking many installations.
Updated by Stefan Neufeind over 11 years ago
If I understand it right then conditions inside the included file do not work? Or what is the problem? Could it be that the condition (to include a file or not) is evaluated after resolving the include (including it's code)? Could we do the includes while evalutating the conditions, thus allowing to conditionally include the file or not? After the inclusion of course the mentioned implicit [global] occurs.
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
No feedback for over 90 days.
Updated by Niels Tiedt over 10 years ago
- Status changed from Closed to New
It would be nice if you could implement a condition feature for the external TS-file include.
Maybe it is possible to fix the above problem with an additional attribute in the INCLUDE_TYPOSCRIPT-Tag.
<INCLUDE_TYPOSCRIPT:source="file:mypath/myfile.ts":condition="globalVar = TSFE:id = 1">
Updated by Jigal van Hemert about 9 years ago
- Status changed from New to In Progress
It can probably be done if we add an optional property to the tag:
<INCLUDE_TYPOSCRIPT:source="file:xxx" condition="yyyy"> <INCLUDE_TYPOSCRIPT:source="dir:zzz" extension="ts" condition="yyyy">
In the core the condition matcher object is already present and must simply be passed when the includes are processed. The condition matcher object can be optional; if no condition matcher object is available in third party code the condition is simply ignored.
Updated by Jigal van Hemert about 9 years ago
- Category set to TypoScript
- Assignee set to Jigal van Hemert
- Target version set to 7.5
Updated by Gerrit Code Review about 9 years ago
- Status changed from In Progress to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review about 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Sebastian Schmal about 9 years ago
jep i have the same problem in T3 6.4.xx
[globalVar = LIT:1 = {$ck.theme.enable}] <INCLUDE_TYPOSCRIPT: source="FILE: EXT:test/Configuration/TypoScript/AllConstants.ts"> [global]
Updated by Gerrit Code Review about 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review almost 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review almost 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review almost 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review almost 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Gerrit Code Review almost 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42431
Updated by Jigal van Hemert almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c4eec960d0a53d30855d3229f485e7532659c458.
Updated by Jigal van Hemert almost 9 years ago
Sebastian Schmal wrote:
dissolved in T3 6.2 ?
No solution for 6.2.x. It's a feature so it will only go into new releases (7.5 in this case).
Updated by Sebastian Schmal almost 9 years ago
mhhh, we need this in 6.2 :(
Is there another solution for 6.2 ?
Updated by Niels Tiedt almost 9 years ago
You can set the conditions in the external ts-file.
Updated by Sebastian Schmal almost 9 years ago
Niels Tiedt wrote:
You can set the conditions in the external ts-file.
jep this works.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed
Updated by Benni Mack over 4 years ago
- Sprint Focus changed from PRC to Needs Decision