<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hyperlink in custom property in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/hyperlink-in-custom-property/m-p/127059#M34547</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have a custom type with some properties (text). I need to add one more property with an hyperlink to another document in documentLibrary.&lt;/P&gt;&lt;P&gt;I know that i link folders using "Copy To -&amp;gt; Create Link", but in this case the link to document is only in folder. I want to create cliccable-hyperlink to related documents inside every documents.&lt;/P&gt;&lt;P&gt;There is a way to do this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 14:35:03 GMT</pubDate>
    <dc:creator>Lvit</dc:creator>
    <dc:date>2021-10-26T14:35:03Z</dc:date>
    <item>
      <title>Hyperlink in custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/hyperlink-in-custom-property/m-p/127059#M34547</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have a custom type with some properties (text). I need to add one more property with an hyperlink to another document in documentLibrary.&lt;/P&gt;&lt;P&gt;I know that i link folders using "Copy To -&amp;gt; Create Link", but in this case the link to document is only in folder. I want to create cliccable-hyperlink to related documents inside every documents.&lt;/P&gt;&lt;P&gt;There is a way to do this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 14:35:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/hyperlink-in-custom-property/m-p/127059#M34547</guid>
      <dc:creator>Lvit</dc:creator>
      <dc:date>2021-10-26T14:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink in custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/hyperlink-in-custom-property/m-p/127060#M34548</link>
      <description>&lt;P&gt;Its not quite clear about the requirement, but If your requirement is that, &lt;U&gt;you have a custom property and you just want to add link manually as a text and want to show it as link on the view details page, you can try below config&lt;/U&gt;:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;field id="demo:xyzprop"&amp;gt;
	&amp;lt;control template="&lt;A href="https://github.com/Alfresco/share/blob/master/web-framework-commons/src/main/resources/alfresco/site-webscripts/org/alfresco/components/form/controls/textfield.ftl" target="_self" rel="nofollow noopener noreferrer"&gt;/org/alfresco/components/form/controls/textfield.ftl&lt;/A&gt;"&amp;gt;
		&amp;lt;control-param name="&lt;A href="https://github.com/Alfresco/share/blob/master/web-framework-commons/src/main/resources/alfresco/site-webscripts/org/alfresco/components/form/controls/textfield.ftl#L8" target="_self" rel="nofollow noopener noreferrer"&gt;activateLinks&lt;/A&gt;"&amp;gt;true&amp;lt;/control-param&amp;gt;
	&amp;lt;/control&amp;gt;
&amp;lt;/field&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Link should be activated on mouse hover and you should be able to click it. Note that, it wont display as link by default unless you mouse hover and text color remains default unlinke usual links.&lt;BR /&gt;&lt;BR /&gt;If you have strict need to show the link with blue color and underline, you have to &lt;A href="https://github.com/Alfresco/share/blob/master/web-framework-commons/src/main/resources/alfresco/site-webscripts/org/alfresco/components/form/controls/textfield.ftl#L9" target="_self" rel="nofollow noopener noreferrer"&gt;update the out of the box template&lt;/A&gt; (create a copy of template at your module level and use it in share form config) and add styling, for example:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;lt;#assign fieldValue=field.value?html?replace("((http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?\\^=%&amp;amp;:\\/~\\+#]*[\\w\\-\\@?\\^=%&amp;amp;\\/~\\+#])?)", "&amp;lt;a href=\"$1\" target=\"_blank\" &lt;FONT color="#0000FF"&gt;style=\"color: blue;text-decoration: underline;\&lt;/FONT&gt;"&amp;gt;$1&amp;lt;/a&amp;gt;", "r")&amp;gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;If you want to show hyperlink on copied file to its original file&lt;/U&gt;. If that is the case, you can use the "&lt;STRONG&gt;cm:copiedfrom&lt;/STRONG&gt;" aspect. This aspect is by default applied to the copied file and adding below given share config would show the link to original doc.&lt;/P&gt;
&lt;PRE&gt;&lt;STRONG&gt;&amp;lt;config evaluator="aspect" condition="cm:copiedfrom"&amp;gt;
&lt;/STRONG&gt;	&amp;lt;forms&amp;gt;
		&amp;lt;form&amp;gt;
			&amp;lt;field-visibility&amp;gt;
				&amp;lt;show id="cm:original" /&amp;gt;
			&amp;lt;/field-visibility&amp;gt;
			&amp;lt;appearance&amp;gt;
				&amp;lt;!-- Applies a CSS (panel) before input fields. --&amp;gt;
				&amp;lt;set id="copied-from" appearance="panel" label-id="set.copied-from.label" /&amp;gt;
				&lt;STRONG&gt;&amp;lt;field id="cm:original" set="copied-from" label-id="field.original.label" read-only="true"&amp;gt;
					&amp;lt;control template="/org/alfresco/components/form/controls/association.ftl"&amp;gt;
						&amp;lt;control-param name="displayMode"&amp;gt;items&amp;lt;/control-param&amp;gt;
						&amp;lt;control-param name="showTargetLink"&amp;gt;true&amp;lt;/control-param&amp;gt;
					&amp;lt;/control&amp;gt;
				&amp;lt;/field&amp;gt;&lt;/STRONG&gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;If you are creating association and want to show the associated files as a link&lt;/U&gt;, then similarly you can use following config example:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;config evaluator="node-type" condition="demo:doc"&amp;gt;
	&amp;lt;forms&amp;gt;
		&amp;lt;form&amp;gt;
			&amp;lt;field-visibility&amp;gt;
				&lt;STRONG&gt;&amp;lt;show id="demo:relatedDocs"/&amp;gt;&lt;/STRONG&gt;
				.....
			&amp;lt;/field-visibility&amp;gt;
			&amp;lt;appearance&amp;gt;
				....
				
				&lt;STRONG&gt;&amp;lt;field id="demo:relatedDocs" label-id="Related Docs"&amp;gt;
					&amp;lt;control template="/org/alfresco/components/form/controls/association.ftl"&amp;gt;
						&amp;lt;control-param name="displayMode"&amp;gt;items&amp;lt;/control-param&amp;gt;
						&amp;lt;control-param name="showTargetLink"&amp;gt;true&amp;lt;/control-param&amp;gt;
					&amp;lt;/control&amp;gt;
				&amp;lt;/field&amp;gt;&lt;/STRONG&gt;
			&amp;lt;/appearance&amp;gt;
		&amp;lt;/form&amp;gt;
		..
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Oct 2021 19:27:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/hyperlink-in-custom-property/m-p/127060#M34548</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-10-26T19:27:22Z</dc:date>
    </item>
  </channel>
</rss>

