08-27-2013 05:22 AM
…
<type name="my:type">
<title>My Type</title>
<parent>cm:content</parent>
</type>
…
…
<config evaluator="node-type" condition="my:type">
<forms>
<form>
<field-visibility>
<show id="cm:name"/>
<show id="cm:title"/>
<show id="cm:description"/>
<show id="TITLE_of_my:type"/> <!– I want to show this on edit and view form –>
</field-visibility>
</form>
</forms>
</config>
…
08-27-2013 08:02 AM
08-28-2013 03:28 AM
<config evaluator="node-type" condition="my:type">
<forms>
<form>
<appearance>
<set id="dublin-core" template="/org/alfresco/components/form/2-column-set.ftl" appearance="title" label="Dublin Core" />
<field id="cm:publisher" set="dublin-core" />
<field id="cm:contributor" set="dublin-core" />
<field id="cm:type" set="dublin-core" />
<field id="cm:identifier" set="dublin-core" />
<field id="cm:dcsource" set="dublin-core" />
<field id="cm:coverage" set="dublin-core" />
<field id="cm:rights" set="dublin-core" />
<field id="cm:subject" set="dublin-core" />
</appearance>
</form>
</forms>
</config>
08-28-2013 05:33 AM
<appearance>
<field id="bv:Document">
<control template="my-field.ftl"/>
</field>
08-28-2013 07:11 AM
<#if field.control.params.titleType??>
<#assign value = field.control.params.titleType>
<#else>
<#assign value = "">
</#if>
<div class="form-field">
<#if form.mode == "view">
<div class="viewmode-field">
<#if field.mandatory && !(value?is_number) && value == "">
<span class="incomplete-warning"><img src="${url.context}/res/components/form/images/warning-16.png" title="${msg("form.field.incomplete")}" /><span>
</#if>
<span class="viewmode-label">${field.label?html}:</span>
<#if field.control.params.activateLinks?? && field.control.params.activateLinks == "true">
<#assign fieldValue=value?html?replace("((http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?\\^=%&:\\/~\\+#]*[\\w\\-\\@?\\^=%&\\/~\\+#])?)", "<a href=\"$1\" target=\"_blank\">$1</a>", "r")>
<#else>
<#if value?is_number>
<#assign fieldValue=value?c>
<#else>
<#assign fieldValue=value?html>
</#if>
</#if>
<span class="viewmode-value"><#if fieldValue == "">${msg("form.control.novalue")}<#else>${fieldValue}</#if></span>
</div>
<#else>
<span class="viewmode-label">${field.label?html}:<span class="mandatory-indicator">${msg("form.required.fields.marker")}</span></span>
<br/>
<#if value?is_number>
<#assign fieldValue=value?c>
<#else>
<#assign fieldValue=value?html>
</#if>
<span class="viewmode-value"><#if fieldValue == "">${msg("form.control.novalue")}<#else>${fieldValue}</#if></span>
</#if>
</div>
<config evaluator="node-type" condition="my:type">
<forms>
<form>
<field-visibility>
<show id="cm:name"/>
<show id="cm:title"/>
<show id="cm:description"/>
<show id="my:nameType"/>
</field-visibility>
<appearance>
<field id="my:nameType" label="Title Type" mandatory="true" read-only="true">
<control template="/org/alfresco/components/form/controls/textfield-custom.ftl">
<control-param name="titleType">My Type</control-param>
</control>
</field>
</appearance>
</form>
</forms>
</config>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.