Suggestion: for Template variables [message #95121] |
Mon, 09 March 2009 09:39 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mnm.criion.net
If a variable is left unchanged and is not a php variable it should not
leave the name of the template variable.
Example:
debug(${variable},'${variable}:${user}:${file}:${comment}');
If the comment is left as-is it should not display the text 'comment'
but an empty string ''
|
|
|
|
Re: Suggestion: for Template variables [message #95169 is a reply to message #95154] |
Wed, 11 March 2009 08:31 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mnm.criion.net
When defining php templates we use template variables like $dollar for
the $-sign and so on. The template also supports custom variables simply
by ${custom}. These variables are left as text if they are not altered
when executing or calling a tempalte, say for(${dollar}${i}...). When
using the template in the above example the ${comment} if left as
${comment} would end up as "comment" in the php code.
So if I use the debug template:
debug(${variable},'${variable}:${user}:${file}:${comment}');
It would look like this:
debug($myvar,'$myvar:me:script:comment');
So I suggest that the template system replaces unchanged template
variables with an empty string:
debug($myvar,'$myvar:me:script:');
It is a very small thing I know but a nice-to-have for all us neat-freaks :)
|
|
|
Powered by
FUDForum. Page generated in 0.04473 seconds