【文件属性】:
文件名称:htmlattributes-craft:Craft CMS 的 HTML 属性 Twig 过滤器
文件大小:4KB
文件格式:ZIP
更新时间:2021-07-09 14:29:37
PHP
html属性
帮助输出 HTML 属性的 Craft 插件(Twig 过滤器)。
用法
树枝模板
{% set attrs = {
class: ['myClass', 'myClass2'],
style: {
'background-image': "url('img.png')",
'color': 'red',
},
'data-foo': {
someKey: 'foo',
otherKey: 'bar',
myArray: ['foo', 'bar', 'baz'],
},
'data-bar': true,
'data-baz': null,
'data-qux': false,
} %}
htmlAttributes也别名为
【文件预览】:
htmlattributes-craft-master
----README.md(736B)
----htmlattributes()
--------twigextensions()
--------HtmlAttributesPlugin.php(550B)
----LICENSE(1KB)
----package.json(457B)