Live templates with two variables

I am trying to create a live template to insert a TD statement like this

echo "<td class = 'classname'>value</td>";

I want to enter classname and then skip to value and enter the value

so, given a class = 'foo' and  value = 'barr'

completing the template would result in

echo "<td class = 'foo'>barr</td>;"

I have tried various combinations of dollar signs surrounding the fields but have been unsuccessful.

Any help wold be appreciated.

Thanks,

-dmd-

1 comment
Comment actions Permalink

Hi there,

I do not see any issue here -- no special tricks required at all. Unless I miss something.

echo "<td class = '$CLASS$'>$VALUE$</td>";

If you want to have more visible placeholder text -- specify default value surrounded by double quotes under "Edit Variables" button.

Navigating from one placeholder/variable to another is done via Tab or Enter.

The above template will be expanded to the following text (with initial values already there):

1

Please sign in to leave a comment.