how to add links in property sheet in alfresco

孤者浪人 提交于 2019-12-12 06:37:44

问题


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>

is there any solution ?


回答1:


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.

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>

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.

You can find several examples of form controls in the source. You might also want to see this wiki page.

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.



来源:https://stackoverflow.com/questions/24738652/how-to-add-links-in-property-sheet-in-alfresco

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!