Don't remove 'extension' from template names

Use getMainText instead of getNameText in a couple of places

Bug: 66939
Change-Id: Ie81ab98465909b65787ddf589353aaad6fb47dc2
Merge "Don't remove 'extension' from template names"