Created
February 16, 2017 10:10
-
-
Save renebakx/c526ab512850c656ab2b51e06e98ca3d to your computer and use it in GitHub Desktop.
twig trick to hide content without marking it as a comment {# #}
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
Sometimes you need to implement HTML from a style guide, but commenting out the whole block with {# #} makes it unreadable. | |
This little 'trick' let's your editor do proper syntax highlighting without showing the HTML in your output | |
{% if false == true %} | |
<div class="form-column"> | |
<label for="upload">Your Resumé</label> | |
<div class="file-upload-field"> | |
<div class="name-display"> | |
<svg class="icon icon-check"><use xlink:href="#icon-check"></use></svg> | |
<svg class="icon icon-cross"><use xlink:href="#icon-cross"></use></svg> | |
<p> | |
Temporary name | |
</p> | |
</div> | |
<label class="fileUpload"> | |
<input name="upload-file-first" type="file" class="upload upload-input" /> | |
<span class="upload-button">Select file</span> | |
</label> | |
</div> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment