Last active
October 3, 2024 14:47
-
-
Save TeamDijon/21f1e8cddde44b42b74a5c84bb7b93e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- comment -%} | |
Renders the template name based on the template object. | |
Accepts: | |
- template {Template object} - Template object | |
Usage: | |
<body class="{% render 'template-name', template: template -%}">...</body> | |
{%- endcomment -%} | |
{% liquid | |
assign template_name = 'template-' | append: template.name | |
if template.suffix | |
assign template_name = template_name | append: ' ' | append: template_name | append: '-' | append: template.suffix | |
endif | |
echo template_name | |
%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment