Actions
Feature #17536
closedPatch for t3lib/class.t3lib_tsparser.php adding php-HEREDOC like syntax
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2007-08-16
Due date:
% Done:
0%
Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:
Description
The TS multiline parenthesis syntax ( ... ) doesn't allow one to define such a multiline text :
config.something (
// this is php that will be eval'd if needed
$res = substr(
"hello world",
0,
5
);
)
As the ");" closing of call to the php function fools the parser, breaking the multiline block.
I implemented a notation similar to php's HEREDOC syntax ( http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc )
So The resulting TS would be:
config.something <<<SOMEPHP
// this is php that will be eval'd if needed
$res = substr(
"hello world",
0,
5
);
SOMEPHP
Note that "SOMEPHP" is variable and defined to whatever the user needs, thus completely avoiding the possibility of end-tag collision with the content.
I checked with TS analyzer and TS syntax highlighting, and patch works fine.
The patch is targeted for v4.1.1 of the file
(issue imported from #M6160)
Files
Actions