Inline the contents of a file in a twig template.
To install Inline, follow these steps:
- Install with Composer via
composer require luwes/craft3-inline
- Install plugin in the Craft Control Panel under Settings > Plugins
Inline works on Craft 3.x.
Internally uses the PHP function file_get_contents
.
{{ inline(assetsUrl ~ '/images/logo.svg') | raw }}
Some things to do, and ideas for potential features:
- Release it
Brought to you by Wesley Luyten