Can I escape the dollar sign in a live template?

Hello,

I'm trying to create a live template where I want a $ display right in front of a live template variable. And I can't find a away to do so.

The live template idea is as follows:

public function set$attribute$($$attributeVar$) {
    $this->_$attributeVar$ = $$attributeVar$;
}

With $attributeVar$ being set to decapitalize(attribute)

I want to produce something like
public function setName($name) {
    $this->_name = $name;
}

Anyone have any ideas?

Thanks.

2 comments
Comment actions Permalink

BTW, I'm using 8.1

0
Comment actions Permalink

With another $ sign.
So in your case 
public function set$attribute$($$$attributeVar$) {
    $this->_$attributeVar$ = $$$attributeVar$;
}
will produce the desired output.

0

Please sign in to leave a comment.