title
Node.js + Express - Tutorial - Handlebars Templating Engine
description
Part of a complete node.js series, including the usage of Express.js and much more!
This video introduces you to the Handlebars templating engine. It shows how to install and configure it, as well as how to use it.
Learn Node.js from scratch with my "Node.js - The Complete Guide" course: https://acad.link/nodejs
Also learn all about MongoDB: https://acad.link/mongodb
Complete source code: https://github.com/mschwarzmueller/nodejs-basics-tutorial
You can follow me on Twitter (@maxedapps), Facebook (https://www.facebook.com/academindchannel/) or visit our Website (https://www.academind.com).
See you in the videos!
detail
{'title': 'Node.js + Express - Tutorial - Handlebars Templating Engine', 'heatmap': [{'end': 385.149, 'start': 338.398, 'weight': 0.732}, {'end': 456.504, 'start': 424.898, 'weight': 0.909}, {'end': 571.168, 'start': 544.724, 'weight': 0.749}, {'end': 642.674, 'start': 621.055, 'weight': 0.895}, {'end': 698.866, 'start': 677.599, 'weight': 0.816}], 'summary': 'The tutorial compares jade and classic html as a templating engine for express, favoring classic html. it also demonstrates the process of replacing jade with handlebars, setting up handlebars in express, and covers its usage, integration with html, rendering functionality, use of helpers, setting up layouts, and passing variables.', 'chapters': [{'end': 46.082, 'segs': [{'end': 46.082, 'src': 'embed', 'start': 1.94, 'weight': 0, 'content': [{'end': 3.021, 'text': 'Hello everyone, welcome back.', 'start': 1.94, 'duration': 1.081}, {'end': 13.569, 'text': 'In the last video we had a look at Jade, the templating engine, Jade, and we kind of played around a little bit with Express so far,', 'start': 3.882, 'duration': 9.687}, {'end': 19.974, 'text': 'and I thought it might be the best idea to just show you an alternative to Jade right now.', 'start': 13.569, 'duration': 6.405}, {'end': 23.497, 'text': 'as Jade is well, you have to kind of like it.', 'start': 19.974, 'duration': 3.523}, {'end': 32.247, 'text': "I'm not a biggest fan of templating engines like jade with white spaces controlling the flow and the structure of the document.", 'start': 24.358, 'duration': 7.889}, {'end': 41.517, 'text': "I'm more a fan of classic HTML and then you just insert some template expressions to manipulate that.", 'start': 32.587, 'duration': 8.93}, {'end': 44.281, 'text': "But that's just my preference, you may choose whatever you like.", 'start': 41.898, 'duration': 2.383}, {'end': 46.082, 'text': 'therefore, however,', 'start': 44.781, 'duration': 1.301}], 'summary': 'Intro to alternatives for jade templating engine and preference for classic html.', 'duration': 44.142, 'max_score': 1.94, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf501940.jpg'}], 'start': 1.94, 'title': 'Comparing jade and classic html', 'summary': 'Compares jade and classic html as a templating engine for express, favoring classic html due to its flexibility and personal choice.', 'chapters': [{'end': 46.082, 'start': 1.94, 'title': 'Jade vs classic html', 'summary': 'Discusses the comparison between jade and classic html as a templating engine for express, highlighting the preference for classic html over jade due to its flexibility and personal choice.', 'duration': 44.142, 'highlights': ['The comparison between Jade and classic HTML as a templating engine for Express, highlighting the preference for classic HTML over Jade due to its flexibility and personal choice.', 'Express and Jade were explored in the previous video, with an alternative to Jade being presented in this chapter due to personal preference for classic HTML.']}], 'duration': 44.142, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf501940.jpg', 'highlights': ['Comparison between Jade and classic HTML for Express, favoring classic HTML due to flexibility and personal choice.', 'Exploration of Express and Jade in previous video, presenting alternative to Jade in this chapter due to preference for classic HTML.']}, {'end': 571.168, 'segs': [{'end': 204.239, 'src': 'embed', 'start': 77.537, 'weight': 0, 'content': [{'end': 83.579, 'text': 'now that i copied it, i will just open my terminal and the first thing is i will uninstall shade.', 'start': 77.537, 'duration': 6.042}, {'end': 84.62, 'text': "i don't have to do that.", 'start': 83.579, 'duration': 1.041}, {'end': 89.722, 'text': "i could let it live there, but i'm not going to use it so well.", 'start': 84.62, 'duration': 5.102}, {'end': 90.582, 'text': 'i will just get rid of it.', 'start': 89.722, 'duration': 0.86}, {'end': 102.647, 'text': 'I will type npm uninstall jade and I will provide the dash dash save tag to also remove it from the dependencies in my package.json file.', 'start': 90.982, 'duration': 11.665}, {'end': 113.097, 'text': 'and yeah, it always helps to be in the right folder.', 'start': 108.673, 'duration': 4.424}, {'end': 115.319, 'text': 'so let me just repeat it there.', 'start': 113.097, 'duration': 2.222}, {'end': 122.505, 'text': 'so now, if we open the package.json file, you see there is no more shade in the dependencies area.', 'start': 115.319, 'duration': 7.186}, {'end': 133.314, 'text': 'next things i will install handlebars and i will install express handlebars which again with the save tag to add to the dependencies, which is well.', 'start': 122.505, 'duration': 10.809}, {'end': 142.843, 'text': 'handlebars optimized or ported to work really great in Node or especially with Express, like the name implies.', 'start': 133.314, 'duration': 9.529}, {'end': 152.211, 'text': 'So now you can see we get this Express Handlebars dependency here and it is also installed here in our Node modules.', 'start': 144.164, 'duration': 8.047}, {'end': 155.794, 'text': 'if we have a look at here Express Handlebars.', 'start': 152.211, 'duration': 3.583}, {'end': 162.857, 'text': 'okay. so now, with that set up, i have to adjust my view engine here.', 'start': 156.414, 'duration': 6.443}, {'end': 167.258, 'text': "because i'm no longer using jade to do this.", 'start': 162.857, 'duration': 4.401}, {'end': 169.719, 'text': "i'll add a new step here.", 'start': 167.258, 'duration': 2.461}, {'end': 175.842, 'text': "the first thing is, i will require express handlebars, which we'll just name this.", 'start': 169.719, 'duration': 6.123}, {'end': 180.604, 'text': 'hbs require express handlebars.', 'start': 175.842, 'duration': 4.762}, {'end': 191.005, 'text': 'there it is, And after doing this, I will add a new entry here where I kind of create a new engine for our Express app.', 'start': 180.604, 'duration': 10.401}, {'end': 193.747, 'text': 'Let it know that I have a new engine available.', 'start': 191.425, 'duration': 2.322}, {'end': 199.432, 'text': 'And I will give this engine an internal name of HBS.', 'start': 195.568, 'duration': 3.864}, {'end': 204.239, 'text': 'And I will use this.', 'start': 200.753, 'duration': 3.486}], 'summary': 'Uninstalled jade, installed handlebars for express app setup.', 'duration': 126.702, 'max_score': 77.537, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf5077537.jpg'}, {'end': 307.159, 'src': 'embed', 'start': 283.065, 'weight': 3, 'content': [{'end': 294.691, 'text': 'Now with that out of the way what I do here is I will set my view engine to HBS because, well, I set it up here as an engine.', 'start': 283.065, 'duration': 11.626}, {'end': 298.593, 'text': 'I registered it as an engine here in my Express app.', 'start': 294.711, 'duration': 3.882}, {'end': 302.255, 'text': 'Oh, and I wanted to add one more parameter here.', 'start': 299.734, 'duration': 2.521}, {'end': 307.159, 'text': 'This is the layouts dir, the directory where layouts will be found.', 'start': 302.275, 'duration': 4.884}], 'summary': 'Setting view engine to hbs and registering it in express app.', 'duration': 24.094, 'max_score': 283.065, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50283065.jpg'}, {'end': 385.149, 'src': 'heatmap', 'start': 338.398, 'weight': 0.732, 'content': [{'end': 343.902, 'text': 'you could also just point to the views folder itself and not to the layout subfolder.', 'start': 338.398, 'duration': 5.504}, {'end': 359.079, 'text': 'next thing is i will move my land.shade file into there and i will will change the the name or the extension of this file to hbs.', 'start': 345.234, 'duration': 13.845}, {'end': 362.66, 'text': "and of course i also can't use this.", 'start': 359.079, 'duration': 3.581}, {'end': 371.703, 'text': "so what i'll do here is i will set up a new well html5 skeleton which i want to use in here.", 'start': 362.66, 'duration': 9.043}, {'end': 373.804, 'text': 'i will output the title.', 'start': 371.703, 'duration': 2.101}, {'end': 385.149, 'text': "i'll share this in a second and between the body tags i want to have the part where the individual pages can well inject or put their content into,", 'start': 373.804, 'duration': 11.345}], 'summary': 'Moving land.shade file to views folder, changing extension to hbs, setting up new html5 skeleton.', 'duration': 46.751, 'max_score': 338.398, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50338398.jpg'}, {'end': 456.504, 'src': 'heatmap', 'start': 424.898, 'weight': 0.909, 'content': [{'end': 432.666, 'text': 'where the name comes from these handlebars here and then I just specify the name of the variable I want to output here, title.', 'start': 424.898, 'duration': 7.768}, {'end': 439.052, 'text': "Because remember, in my routes file here, I'm setting this title variable here.", 'start': 433.146, 'duration': 5.906}, {'end': 442.008, 'text': 'And well, this is just what it will output here.', 'start': 440.166, 'duration': 1.842}, {'end': 456.504, 'text': 'Next thing is the part where the block content, where the individual pages can inject their content is set up by using free calling braces.', 'start': 442.929, 'duration': 13.575}], 'summary': 'Describes how to output a variable and set up block content in the routes file.', 'duration': 31.606, 'max_score': 424.898, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50424898.jpg'}, {'end': 571.168, 'src': 'heatmap', 'start': 488.971, 'weight': 5, 'content': [{'end': 497.753, 'text': 'So I have three curly braces here and then we name this body because body is the reserved name,', 'start': 488.971, 'duration': 8.782}, {'end': 508.541, 'text': 'so to say the reserved uh hook handlebars will look for and which will be kind of overwritten or replaced with the content of the pages.', 'start': 497.753, 'duration': 10.788}, {'end': 513.105, 'text': 'so this name is not optional or not freely chosen.', 'start': 508.541, 'duration': 4.564}, {'end': 520.311, 'text': 'it has to be body here, because we set this file up as our main layout, if you remember the app.js file,', 'start': 513.105, 'duration': 7.206}, {'end': 531.994, 'text': 'And therefore handlebars will then look for this body part here to insert the actual content of the individual pages.', 'start': 521.171, 'duration': 10.823}, {'end': 534.055, 'text': 'So I hope this is clear how this works.', 'start': 532.314, 'duration': 1.741}, {'end': 537.576, 'text': 'So this is how we set up our layout.', 'start': 534.815, 'duration': 2.761}, {'end': 542.877, 'text': "Now let's change our index.sh file to index.hbs.", 'start': 538.696, 'duration': 4.181}, {'end': 550.249, 'text': "Here again we can't use this but we of course want to use our layout.", 'start': 544.724, 'duration': 5.525}, {'end': 557.316, 'text': "We don't have to extend it because if you remember in the app.js file we set a default layout of this layout file.", 'start': 550.429, 'duration': 6.887}, {'end': 565.804, 'text': 'Now we could overwrite this when rendering our page, and we will see this in future lectures, but as we have this default layout,', 'start': 557.716, 'duration': 8.088}, {'end': 567.566, 'text': "I don't need to extend anything.", 'start': 565.804, 'duration': 1.762}, {'end': 571.168, 'text': "I also don't need this block content because, as I said,", 'start': 568.226, 'duration': 2.942}], 'summary': "Handlebars uses 'body' as reserved name for main layout, overwriting 'index.sh' to 'index.hbs' for default layout setup.", 'duration': 61.278, 'max_score': 488.971, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50488971.jpg'}], 'start': 46.082, 'title': 'Replacing jade with handlebars and setting up handlebars in express', 'summary': "Demonstrates the process of replacing jade with handlebars, including uninstalling jade, installing handlebars and express handlebars, and setting up handlebars as the new view engine in the express app. it also explains how to set up handlebars in an express app, specifying the layouts directory and creating a main layout for individual pages to inject their content using handlebars syntax and reserved names like 'body'.", 'chapters': [{'end': 281.863, 'start': 46.082, 'title': 'Replacing jade with handlebars', 'summary': 'Demonstrates replacing jade with handlebars, including uninstalling jade, installing handlebars and express handlebars, and setting up handlebars as the new view engine in the express app.', 'duration': 235.781, 'highlights': ['Uninstalling Jade and removing it from package.json dependencies The speaker uninstalls Jade from the project and removes it from the package.json dependencies, ensuring it is no longer used.', 'Installing Handlebars and Express Handlebars with save tag to add to the dependencies The process of installing Handlebars and Express Handlebars is demonstrated, ensuring they are added to the project dependencies.', 'Setting up Handlebars as the new view engine in the Express app The chapter explains the steps to set up Handlebars as the new view engine in the Express app, including requiring Express Handlebars, creating a new engine, and defining layout options.']}, {'end': 571.168, 'start': 283.065, 'title': 'Setting up handlebars in express', 'summary': "Explains how to set up handlebars as the view engine in an express app, including specifying the layouts directory and creating a main layout for individual pages to inject their content using handlebars syntax and reserved names like 'body'.", 'duration': 288.103, 'highlights': ["The chapter explains how to set up Handlebars as the view engine in an Express app, including specifying the layouts directory and creating a main layout for individual pages to inject their content using handlebars syntax and reserved names like 'body'.", 'Handlebars is set as the view engine in the Express app, with specific configuration for the layouts directory and file extensions.', "Explanation of how to use handlebars syntax to output variables and specify the reserved name 'body' for injecting content into the main layout.", "Details on setting up the main layout for individual pages to inject their content using handlebars syntax and reserved names like 'body'."]}], 'duration': 525.086, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf5046082.jpg', 'highlights': ['Uninstalling Jade and removing it from package.json dependencies The speaker uninstalls Jade from the project and removes it from the package.json dependencies, ensuring it is no longer used.', 'Installing Handlebars and Express Handlebars with save tag to add to the dependencies The process of installing Handlebars and Express Handlebars is demonstrated, ensuring they are added to the project dependencies.', 'Setting up Handlebars as the new view engine in the Express app The chapter explains the steps to set up Handlebars as the new view engine in the Express app, including requiring Express Handlebars, creating a new engine, and defining layout options.', "The chapter explains how to set up Handlebars as the view engine in an Express app, including specifying the layouts directory and creating a main layout for individual pages to inject their content using handlebars syntax and reserved names like 'body'.", 'Handlebars is set as the view engine in the Express app, with specific configuration for the layouts directory and file extensions.', "Explanation of how to use handlebars syntax to output variables and specify the reserved name 'body' for injecting content into the main layout.", "Details on setting up the main layout for individual pages to inject their content using handlebars syntax and reserved names like 'body'."]}, {'end': 1068.796, 'segs': [{'end': 599.802, 'src': 'embed', 'start': 571.168, 'weight': 0, 'content': [{'end': 582.013, 'text': 'handlebars will always take the content in this file and just insert it where it finds this body part, this body hook in the layout.', 'start': 571.168, 'duration': 10.845}, {'end': 587.656, 'text': 'So all I have here is an h1 title, which again should be the title.', 'start': 582.673, 'duration': 4.983}, {'end': 599.802, 'text': "And then let's say to create the same view as in the last lecture, I will have a paragraph which says welcome to and then again.", 'start': 589.796, 'duration': 10.006}], 'summary': 'Handlebars inserts content into layout, including h1 title and welcome paragraph.', 'duration': 28.634, 'max_score': 571.168, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50571168.jpg'}, {'end': 654.566, 'src': 'heatmap', 'start': 621.055, 'weight': 0.895, 'content': [{'end': 626.798, 'text': "so i i save this And now let's run the app, shall we?", 'start': 621.055, 'duration': 5.743}, {'end': 631.062, 'text': 'So I run my server here and I reload my page.', 'start': 627.559, 'duration': 3.503}, {'end': 632.364, 'text': 'And as you can see, this works.', 'start': 631.102, 'duration': 1.262}, {'end': 635.987, 'text': 'And this is now rendered through handlebars, not jade.', 'start': 632.744, 'duration': 3.243}, {'end': 642.674, 'text': 'So last thing is I will also rewrite my error file here.', 'start': 637.709, 'duration': 4.965}, {'end': 645.097, 'text': 'Again, replace the file ending.', 'start': 643.115, 'duration': 1.982}, {'end': 654.566, 'text': "get rid of this and let's just well output the error message here like that, and I will get rid of the other stuff I had here.", 'start': 646.198, 'duration': 8.368}], 'summary': 'Server successfully renders content using handlebars instead of jade.', 'duration': 33.511, 'max_score': 621.055, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50621055.jpg'}, {'end': 745.027, 'src': 'heatmap', 'start': 677.599, 'weight': 1, 'content': [{'end': 687.741, 'text': "now i want in my routes file i'll get rid of these routes because currently they don't need anywhere i want, i still have my conditional.", 'start': 677.599, 'duration': 10.142}, {'end': 698.866, 'text': 'i will use this and i will pass an array here too which should just hold well, three numbers now in my index file again.', 'start': 687.741, 'duration': 11.125}, {'end': 709.099, 'text': "let's first say i want to check if a certain condition is met and as you saw, i'm passing this condition variable which just says false.", 'start': 698.866, 'duration': 10.233}, {'end': 709.92, 'text': 'how could i do this?', 'start': 709.099, 'duration': 0.821}, {'end': 714.72, 'text': 'Handlebars has this concept called helpers.', 'start': 710.779, 'duration': 3.941}, {'end': 726.704, 'text': 'We can write our own helper functions which basically transform code or which, well, add a certain functionality to the templating engine we can use.', 'start': 715.04, 'duration': 11.664}, {'end': 736.006, 'text': 'It also has some built-in helpers like, well, things you often use like if statements or each loops, so what we need here.', 'start': 727.124, 'duration': 8.882}, {'end': 738.287, 'text': "Let's start with the if statement.", 'start': 736.686, 'duration': 1.601}, {'end': 745.027, 'text': 'This helper will be a block expression because it will have multiple lines.', 'start': 740.106, 'duration': 4.921}], 'summary': 'Modifying routes file, using conditional helpers in handlebars for functionality.', 'duration': 57.286, 'max_score': 677.599, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50677599.jpg'}, {'end': 820.424, 'src': 'embed', 'start': 796.558, 'weight': 3, 'content': [{'end': 805.64, 'text': "but it's kind of a block because we're wrapping some content with this overall template expression here, which is not independent.", 'start': 796.558, 'duration': 9.082}, {'end': 811.002, 'text': 'or these individual lines are not independent of each other, but they kind of work together.', 'start': 805.64, 'duration': 5.362}, {'end': 820.424, 'text': "So to let Handlebars know that, I have to specify that we're now writing some code over multiple lines or that we have this block here.", 'start': 811.922, 'duration': 8.502}], 'summary': 'Handlebars requires specifying code over multiple lines or blocks for interdependent content.', 'duration': 23.866, 'max_score': 796.558, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50796558.jpg'}, {'end': 934.644, 'src': 'embed', 'start': 907.423, 'weight': 5, 'content': [{'end': 910.746, 'text': "So now let's output this array with an each loop.", 'start': 907.423, 'duration': 3.323}, {'end': 916.19, 'text': 'Again, in my index file, each loop is a block too right?', 'start': 912.087, 'duration': 4.103}, {'end': 920.073, 'text': 'Because again we would have like an opening of the each loop,', 'start': 916.23, 'duration': 3.843}, {'end': 929.06, 'text': 'then some code or some HTML well content between the opening and ending statement and then, well, the ending statement.', 'start': 920.073, 'duration': 8.987}, {'end': 934.644, 'text': 'So to do this, I will again open up my block statement with double curly braces and hash.', 'start': 929.98, 'duration': 4.664}], 'summary': 'Using an each loop in the index file to output an array.', 'duration': 27.221, 'max_score': 907.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50907423.jpg'}, {'end': 1065.334, 'src': 'embed', 'start': 1033.782, 'weight': 6, 'content': [{'end': 1037.647, 'text': 'second element is two and third element is three.', 'start': 1033.782, 'duration': 3.865}, {'end': 1041.074, 'text': 'so this is how you can use the each expression here.', 'start': 1037.647, 'duration': 3.427}, {'end': 1045.321, 'text': 'Well, these are the very basics about handlebars.', 'start': 1043, 'duration': 2.321}, {'end': 1047.803, 'text': 'As I said, you can write your own helpers.', 'start': 1045.502, 'duration': 2.301}, {'end': 1051.505, 'text': 'We can include partials and so on.', 'start': 1048.183, 'duration': 3.322}, {'end': 1056.548, 'text': 'And these are all things you can very easily look up if you want to know them right now.', 'start': 1052.126, 'duration': 4.422}, {'end': 1065.334, 'text': 'Otherwise, we will use handlebars in the future videos and you will therefore see how to do things like this.', 'start': 1057.489, 'duration': 7.845}], 'summary': 'Introduction to handlebars with basic concepts and future applications.', 'duration': 31.552, 'max_score': 1033.782, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf501033781.jpg'}], 'start': 571.168, 'title': 'Handlebars template engine', 'summary': 'Covers the usage of handlebars as a templating engine, its integration with html, comparison with jade, rendering functionality, use of helpers, setting up layouts, passing variables, and basics of the handlebars template engine, writing custom helpers, using built-in helpers, and syntax for block expressions, with examples and demonstrations.', 'chapters': [{'end': 714.72, 'start': 571.168, 'title': 'Handlebars templating and usage', 'summary': 'Discusses the usage of handlebars as a templating engine, highlighting its integration with html, comparison with jade, rendering functionality, and the use of helpers, with a focus on setting up layouts and passing variables in the index file.', 'duration': 143.552, 'highlights': ['Handlebars integrates with HTML, utilizing the double curly braces syntax for inserting content, enabling a seamless transition from Jade, and providing a clear rendering process.', 'The process of setting up handlebars involves using layouts and replacing file endings, resulting in a well-structured and valid file for usage.', 'The usage of helpers in Handlebars allows for conditional statements and the passing of variables, as demonstrated through the use of a condition variable to check for specific conditions.']}, {'end': 1068.796, 'start': 715.04, 'title': 'Handlebars template engine basics', 'summary': 'Introduces the basics of the handlebars template engine, including writing custom helpers, using built-in helpers like if statements and each loops, and the syntax for block expressions, with examples and demonstrations of their functionality.', 'duration': 353.756, 'highlights': ['Introduction to writing custom helpers and using built-in helpers like if statements and each loops The chapter discusses the ability to write custom helper functions and the availability of built-in helpers like if statements and each loops.', 'Demonstration of the syntax and functionality of block expressions in Handlebars The chapter provides a detailed demonstration of the syntax and functionality of block expressions in Handlebars, emphasizing the difference between block and non-block expressions and showcasing the usage of if statements and each loops as block expressions.', "Explanation of syntax for block expressions and the use of reserved keywords like 'each' and 'this' The chapter explains the syntax for block expressions in Handlebars, including the use of reserved keywords like 'each' and 'this' for iterating over arrays and outputting the current value or key.", 'Overview of advanced Handlebars features like writing custom helpers and including partials The chapter briefly mentions advanced features of Handlebars such as writing custom helpers and including partials, highlighting that these topics will be covered in future videos.']}], 'duration': 497.628, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1srD3Mdvf50/pics/1srD3Mdvf50571168.jpg', 'highlights': ['Handlebars integrates with HTML, utilizing the double curly braces syntax for inserting content, enabling a seamless transition from Jade, and providing a clear rendering process.', 'Introduction to writing custom helpers and using built-in helpers like if statements and each loops The chapter discusses the ability to write custom helper functions and the availability of built-in helpers like if statements and each loops.', 'The process of setting up handlebars involves using layouts and replacing file endings, resulting in a well-structured and valid file for usage.', 'Demonstration of the syntax and functionality of block expressions in Handlebars The chapter provides a detailed demonstration of the syntax and functionality of block expressions in Handlebars, emphasizing the difference between block and non-block expressions and showcasing the usage of if statements and each loops as block expressions.', 'The usage of helpers in Handlebars allows for conditional statements and the passing of variables, as demonstrated through the use of a condition variable to check for specific conditions.', "Explanation of syntax for block expressions and the use of reserved keywords like 'each' and 'this' The chapter explains the syntax for block expressions in Handlebars, including the use of reserved keywords like 'each' and 'this' for iterating over arrays and outputting the current value or key.", 'Overview of advanced Handlebars features like writing custom helpers and including partials The chapter briefly mentions advanced features of Handlebars such as writing custom helpers and including partials, highlighting that these topics will be covered in future videos.']}], 'highlights': ['Setting up Handlebars as the new view engine in the Express app, including requiring Express Handlebars, creating a new engine, and defining layout options.', 'Handlebars integrates with HTML, utilizing the double curly braces syntax for inserting content, enabling a seamless transition from Jade, and providing a clear rendering process.', 'Introduction to writing custom helpers and using built-in helpers like if statements and each loops.', 'Demonstration of the syntax and functionality of block expressions in Handlebars, emphasizing the difference between block and non-block expressions and showcasing the usage of if statements and each loops as block expressions.']}