Hello Stephen,
To have 802.1q interface configured by feature template you can follow these steps:
1.-Create the parent interface feature template, don't need to add addressing or any other parameter:
2.-Create the subinterface using the same interface feature template but now just add to the interface number the vlan or 802.1 q number that you need. In this case we are using vlan 20
3.-Add the feature templates in your device template. In this example we are using Transport section.
4.-Then you can apply the template into the device normally and you will see that the "encapsulation 802.1q 20" will be created directly in the subinterface
Note: To accommodate the 32-bit field added to packets by the 802.1Q protocol, the MTU for subinterfaces must be at least 4 bytes smaller than the MTU of the physical interface. This is configured with the mtu<value> command. The default MTU on a physical interface is 1500 bytes, hence the MTU of the subinterface must not be larger than 1496 bytes. Also, if the subinterface requires an MTU of 1500 bytes, the physical interface MTU can be adjusted to 1504 bytes.
Hope this helps with your need