Added template model methods to get first value of data properties and first statement of data props and uncollated object props. Improved efficiency of moniker/preferred title code in person template. Added order by statement to default list view queries so order is not random.

This commit is contained in:
rjy7 2011-02-07 15:52:51 +00:00
parent ec5283795f
commit e028e17010
4 changed files with 16 additions and 3 deletions

View file

@ -180,7 +180,7 @@ name will be used as the label. -->
If there's a mainImage statement but no thumbnail image, treat it as if there is no image. -->
<#if (mainImage.statements)?has_content && thumbUrl?has_content>
<a href="${individual.imageUrl}"><img class="individual-photo" src="${thumbUrl}" title="click to view larger image" alt="${individual.name}" width="160" /></a>
<@p.editingLinks "${mainImage.localName}" mainImage.statements[0] editable />
<@p.editingLinks "${mainImage.localName}" mainImage.first editable />
<#else>
<#local imageLabel><@p.addLinkWithLabel mainImage editable "Photo" /></#local>
${imageLabel}