[TYPO3-dev] Multiline typoscript and end parenthesis

Bernd Wilke xoonsji02 at sneakemail.com
Wed Aug 15 22:34:51 CEST 2007


On Wed, 15 Aug 2007 12:00:19 +0300, Jerome Schneider wrote
with subject "[TYPO3-dev] Multiline typoscript and end parenthesis":

> Hi guys,
> 
> I have a problem using multiline typoscript syntax describe at [1]
> 
> I have a FORMIDABLE_INT cObj that can handle events thrown by the client 
> browser via ajax. The tasks to execute when event is trigered are 
> defined by php inside my so-called userobj.
> 
> My php lines are confined in a TS multiline notation ( )
> The problem is that closing a function call with ");" inside such a 
> multiline block fools the parser, as it detects it as the end of the 
> multiline block.
> 
> In my TS code (complete below), here are the problematic lines:
> 
>          $rSql = $GLOBALS["TYPO3_DB"]->exec_SELECTquery(
> 	  "title",
> 	  "pages",
> 	  "uid=" . $iPageUid
> 	);	// this line fools the parser
> 
> 
> Does anybody knows a workaround to this ? I could surely avoid to place 
> the ");" on a single line, but this would be really unhandy on the long 
> term.

I would have tried PHP-comments, but that could fool the parser if it
decides to open an typoscript-comment, which can't be closed the same line!

something like:
    $rSql = $GLOBALS["TYPO3_DB"]->exec_SELECTquery(
                                                   "title",
                                                   "pages",
                                                   "uid=" . $iPageUid
                               /* */              ); 
    )

or some other characters which are neutral to the php:
(this time in my preferred formatting)
    $rSql = $GLOBALS["TYPO3_DB"]->exec_SELECTquery("title"
                                                  ,"pages"
                                                  ,"uid=" . $iPageUid
                                                  .''); 
    )

Propably your way of expanding syntax is best. 
But so you have to patch every version until your fix is implemented in
core.

Bernd
-- 
Don't ask what the TYPO3-community can do for you.
Ask what you can do for the TYPO3-community.

http://www.pi-phi.de/t3v4/cheatsheet.html




More information about the TYPO3-dev mailing list