Files
liquid/_posts/objects/template.md
2014-07-23 11:17:11 -04:00

38 lines
509 B
Markdown

---
layout: default
title: template
nav:
group: Liquid Variables
---
# template
<code>template</code> returns the name of the template used to render the current page, with the <code>.liquid</code> extension omitted.
<p class="input">Input</p>
<div>
{% highlight html %}{% raw %}
<!-- If you're on the index.liquid template -->
{{ template }}
{% endraw %}{% endhighlight %}
</div>
<p class="output">Output</p>
<div>
{% highlight html %}{% raw %}
index
{% endraw %}{% endhighlight %}
</div>