Displaying two fields of representation metadata in pawtucket doesn't work

Hello,

We would like to display the metadata of images in the default theme in pawtucket. So we edited the file /var/www/html/ca/pawtucket/themes/default/conf/detail.conf and added the following lines:

representationViewerCaptionTemplate = <div class='small'>^ca_object_representations.preferred_labels.name</div>

// for displaying preferred labels field

and

representationViewerCaptionTemplate = <div class='small'>^ca_object_representations.origin_code</div>

// for displaying the new field we created from scratch, named origin_code.

We cannot display both fields simultaneously but only one per time is displayed in the frontend. Is there a limitation we have to configure to display both fields ?

Thank you in advance.

Comments

  • edited February 22

    Hi,

    If you do that, the second assignation of representationViewerCaptionTemplate will replace the first one.

    But you can display both metadata like this:

    representationViewerCaptionTemplate = <div class='small'>Name: ^ca_object_representations.preferred_labels.name - Origin code: ^ca_object_representations.origin_code</div>
    

    or, if you need to test if one metadata is not empty:

    representationViewerCaptionTemplate = <div class='small'>Name: ^ca_object_representations.preferred_labels.name
    <ifdef code="ca_object_representations.origin_code"><br>Origin code: ^ca_object_representations.origin_code</ifdef></div>
    


  • Thank you! It worked!

Sign In or Register to comment.