Add doc to template and remove the lie that was "attributes".

"attributes" is built automatically in template_process().
Use interpolated strings instead of the str_replace() silliness.