Inverted path selection for fetching templates