Learning template

how to insert one template into page.

I have my template, name is search.html

templat

this template related js file, search.js

Capt1

Importantly, we need to import “templating”, “search.html”, and set helpers, helpers is for setting your template name, not the file name.

Now i want to use this template into my first_page.html, so we have to put it into my first_page.js

Ca1

we need to import templating, collections (database), template search.js, and related first_page.html.

Finally, we just need to use {{>searchbox}} into first_page.html.

done!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s