Tsallaka zuwa abun ciki
Justice Tech School

Include and Comments

include inserts another template and can pass values. {# #} makes a comment that is not sent to the browser.

Example
{# header partial #}
{% include "partials/header.html" with title="Home" %}
{% comment %}
Long comment block.
{% endcomment %}

Exercise

Insert a partial.

{%  "partials/nav.html" %}

Quiz Test

Are template comments visible to users?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.