How to render a template inside another template with blaze

#1

Like the tittle says I want to render a template inside another one with a click, I click a confirm button from a modal with the data I chose from a select statement and after that the template loads, but not saves it, this is just to load a div with information about something from the database and after confirming the data from the parent template it will save my data.

This is a signup I’m doing and I have to load from another template with data from the database and my use needs to be able to choose from which company he is with the company’s info already registered. The reason I’m doing this is because the companies are a different type of user in my application.

Any type of help is really appreciated.

#2

You either want to put the include inside an {{#if}} block or use {{> Template.dynamic }}

{{#if loadTemplate}}
  {{> includedTemplate }}
{{/if}}
1 Like
#3

Thanks for the help :grin:

1 Like