O'Reilly logo

Meteor: Full-Stack Web Application Development by Marcelo Reyna, Isaac Strack, Fabian Vogelsteller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating custom components

Adding and using templates in Meteor is a great way to speed up your workflow. Using Meteor's built-in content block helpers can further streamline your workflow by allowing nested and deferred template calls. In essence, you can combine and nest templates to create your own "components". This recipe will show you how to build a basic Spacebars custom block helper using Template.contentBlock.

Getting ready

We will use the codebase from the Building a smooth interface with Bootstrap recipe found in this chapter. Please follow that recipe first, or download the corresponding codebase.

How to do it…

Proceed with the following steps to create custom components:

  1. We need to make the template-specific shapeCount helper global so ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required