0

我将 HAML 与 Locomotive CMS 的液体模板一起使用。最近,我收到以下错误:

Liquid::SyntaxError at /
Tag '{%' was not properly terminated with regexp: /\%\}/

我正在使用块标记li通过从子模板文件覆盖它来向 a 添加类。仅供参考,我正在使用包含在 Locomotive 的 Liquid 前叉中的 Liquid Inheritance。

%li.menu-list-item{:class => "{% block 'at_about_page' %}{% endblock %}"}
4

1 回答 1

0

原来我不能同时拥有.classHAML 格式的 a 并指定一个{:class => ""}标签块。

进入menu-list-item之后定义的类属性:

%li{:class => "menu-list-item {% block 'at_about_page' %}{% endblock %}"}
于 2013-08-22T04:08:56.887 回答