EXOGTN-1562: Support changing the folder of portal, group, user template

Problem analysis:
	- Only get the first loaded template path

FIx descrption:
	- Get the latest loaded template path