{{velocity}}
#set ($propertyClass = $object.getxWikiClass().get($name))
#if ($type == 'edit')
{{html clean="false"}}$doc.displayEdit($propertyClass, $prefix, $object){{/html}}
#elseif ($type == 'hidden')
{{html clean="false"}}$doc.displayHidden($propertyClass, $prefix, $object){{/html}}
#else
#if ("$!value" != '')
#set ($reference = $services.model.resolveDocument($value))
#set ($target = $xwiki.getDocument($reference))
#set ($url = $xwiki.getURL($reference))
{{html clean="false"}}<a href="$escapetool.xml($url)">$escapetool.xml($target.displayTitle)</a>{{/html}}
#end
#end
{{/velocity}}