Templater Code for modular Template?

I would like to import a Template on a Page, but getting a dropdown menu, where I can decide which component shall be imported from the template category. Does someone have already code available? Or a other way to do?

I’ve seen this method mentioned here and there:

Corresponding demo vault with code:

1 Like