Register a script block

Using \yii\web\View we can register scripts with either:




but to register a script block with a custom type and id that holds a template (like this):

<script id="template" type="x-tmpl-mustache">




that wouldn’t be possible using the only two methods mentioned above. I tried looking at the documentation and the source code of yii&#092;widgets&#092;View but nothing useful!