[英]How to implement Clay in Liferay 7.2
尽管我试图在 Liferay 7.2 文档中找到一个明确的手册,但我无法在 Liferay 7.2 中获得一种具体且“非神秘”的实现粘土的方式。 只是期待一些关于如何在 Liferay 7.2 主题上实现 Clay 的反馈,因为到目前为止我发现的一切都是 Clay 有多棒以及 Clay 与 Liferay 的工作有多棒,但没有如何在其中实现。 非常感谢一些反馈。
更新:
经过大量研究,这就是我所做的,但现在我有 JAVA 错误(我重复我一个前端开发人员,所以我对 JAVA 100% 无知):
将此代码添加到我的 build.gradle 在 liferay-workspace 目录中:
compileOnly 组:“com.liferay”,名称:“com.liferay.frontend.taglib.soy”,版本:“1.0.10”
compileOnly 组:“com.liferay”,名称:“com.liferay.frontend.taglib.clay”,版本:“1.0.0”
导入 mi init.jsp 上的 taglib(在 liferay-dxp-7.2.10-ga1\tomcat-9.0.17\webapps\ROOT\html\portal 中),以便在每个 portlet 和 web 内容中使用它:
现在我收到了这个错误:
"The absolute uri: [ http://liferay.com/tld/clay] cannot be resolved in either web.xml or the jar files deployed with this application"
您可以使用可用的标签库来使用 Clay
compile group: 'com.liferay', name: 'com.liferay.frontend.taglib.clay'.
<%@ taglib uri="http://liferay.com/tld/clay" prefix="clay"%>.
<clay:alert title="test" message="test"/>
您也可以通过使用直接 html 来使用没有标签库的粘土
<div class="alert alert-danger" role="alert">
<span class="alert-indicator">
<svg class="lexicon-icon lexicon-icon-exclamation-full" focusable="false" role="presentation">
<use href="/images/icons/icons.svg#exclamation-full"></use>
</svg>
</span>
<strong class="lead">Error:</strong>This is an error message
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.