我能够在露天的属性表中添加一个属性并显示一些消息,但现在我希望消息是一个链接就像
I was able to add a property to the property sheet in alfresco and display some message in, but now i want the message to be a link just like
<a href="#" > someText </a>有什么解决方案吗?
推荐答案如果您查看共享表单配置,您会看到几个与其关联的控件的字段示例。做你要问的一种方法是为该特定属性添加自定义控件。
If you go look in the Share form configuration you'll see several examples of fields that have "controls" associated with them. One way to do what you are asking is to add a custom control for that particular property.
例如,你可以编辑share-config-custom.xml并转到要显示链接并添加自定义控件的属性的字段元素,如下所示:
For example, you could edit share-config-custom.xml and go to the field element for the property you want to display a link and add a custom control, like this:
<field id="cm:title"> <control template="/com/example/components/form/controls/displayLink.ftl" /> </field>一旦到位,在web-extension / site-webscripts / com /中创建一个freemarker模板Alfresco Share AMP项目中的example / components / form / controls / displayLink.ftl。
Once that is in place, create a freemarker template in web-extension/site-webscripts/com/example/components/form/controls/displayLink.ftl in your Alfresco Share AMP project.
您可以在源代码中找到几个表单控件的示例。您可能还想查看此Wiki页面。
You can find several examples of form controls in the source. You might also want to see this wiki page.
如果您想要在文档操作下创建链接,则可以使用自定义UI操作执行此操作。有一个如何使用简单的URL在本教程。
If you instead want to create a link under "Document Actions" you can do that with a custom UI action. There is an example of how to do a UI Action with a simple URL in this tutorial.
更多推荐
如何在alfresco中添加属性表中的链接
发布评论