Is there a way to add specific attributes to individual phases other than adding the attribute to the general template?
click on the template, and select "Allow Extensions". This will allow to add any additional attributes in the elements where this template is mapped.
Just a suggestion, if you find yourself adding the same attribute to a multiple sub-set of elements based on the same template, consider using derived templates instead!
There's a few directions to go with this. One may have a case where the exception is that 1 or a few elements have "extra" attributes, so would go the Extensions route as mentioned by Lal Babu. If it's several, then a good approach is what Sebastian suggests, using a derived template. But one may have a case that almost all elements look the same, save for 1 or a few that have less attributes. Here you could Exclude the attributes on the elements where they do not apply.
If the phase template comes from a batch interface you can use recipe templates to select a non-default template based on the phase.
Retrieving data ...