目前我正在 Liferay 6.2 中开发结构/模板组合,我发现了一个问题。
在我的结构中,用户可以键入外部站点的 url(例如“www.google.com”):
<dynamic-element dataType="string" indexType="keyword" localizable="true" name="website" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small">
<meta-data locale="de_DE">
<entry name="label">
<![CDATA[Website (www.)]]>
</entry>
<entry name="predefinedValue">
<![CDATA[]]>
</entry>
<entry name="tip">
<![CDATA[]]>
</entry>
</meta-data>
</dynamic-element>
在我的模板中,我想要一个指向该页面的链接,但当前代码只是将结构的字符串值附加到我网站的 BaseURL。像 www.company-url.de/web/www.google.de
<a href="${website.getData()}">More information</a>
(我不能提供正确的网址,因为我不确定是否允许)
有没有办法告诉 Liferay 使用字符串作为独立的 url,而不是附加它?
非常感谢你的帮助。