Although its not a great answer, I think the best way to accomplish this with a document template is with a separate string attribute that you populate as you want to (i.e. with a dollar sign if there is a value and no dollar sign if there is no value, etc.)
At the moment, document templates are pretty limited in their functionality. From what I understand, there are improvements being made to document templates that will greatly improve them. Look for those improvements to be released by the end of this year.
Hope that helps,