file.html.twig in Bamboo Twig 8.5
<div class="test-files">
<!-- Extension Guesser -->
<h2>Extension Guesser</h2>
<hr>
<div class="ext-guesser-pdf">
{{ 'application/pdf'|bamboo_file_extension_guesser }}
</div>
<div class="ext-guesser-word-legacy">
{{ 'application/msword'|bamboo_file_extension_guesser }}
</div>
<div class="ext-guesser-word">
{{ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'|bamboo_file_extension_guesser }}
</div>
<div class="ext-guesser-png">
{{ 'image/png'|bamboo_file_extension_guesser }}
</div>
<!-- System Url -->
<h2>System Url</h2>
<hr>
<div class="url-module-file-relative">
{{ file_url(bamboo_path_system('module', 'bamboo_twig_test') ~'/files/antistatique.jpg') }}
</div>
<div class="url-module-file-absolute">
{{ bamboo_file_url_absolute(bamboo_path_system('module', 'bamboo_twig_test') ~'/files/antistatique.jpg') }}
</div>
</div>
File
tests/modules/bamboo_twig_test/templates/file.html.twig
View source
- <div class="test-files">
-
- <!-- Extension Guesser -->
- <h2>Extension Guesser</h2>
- <hr>
- <div class="ext-guesser-pdf">
- {{ 'application/pdf'|bamboo_file_extension_guesser }}
- </div>
- <div class="ext-guesser-word-legacy">
- {{ 'application/msword'|bamboo_file_extension_guesser }}
- </div>
- <div class="ext-guesser-word">
- {{ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'|bamboo_file_extension_guesser }}
- </div>
- <div class="ext-guesser-png">
- {{ 'image/png'|bamboo_file_extension_guesser }}
- </div>
-
- <!-- System Url -->
- <h2>System Url</h2>
- <hr>
- <div class="url-module-file-relative">
- {{ file_url(bamboo_path_system('module', 'bamboo_twig_test') ~'/files/antistatique.jpg') }}
- </div>
- <div class="url-module-file-absolute">
- {{ bamboo_file_url_absolute(bamboo_path_system('module', 'bamboo_twig_test') ~'/files/antistatique.jpg') }}
- </div>
- </div>