Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add a new Global Property named "layout.name.template" if it already exists, update it's value to the your custom xml template: 

    Code Block
    <org.openmrs.layout.name.NameTemplate>
      <codeName>customXmlTemplate</codeName>
      <displayName>Custom Name Format</displayName>
      <nameMappings class="properties">
        <property name="prefix" value="PersonName.prefix"/>
        <property name="givenName" value="PersonName.givenName"/>
        <property name="familyName" value="PersonName.familyName"/>
      </nameMappings>
      <sizeMappings class="properties">
        <property name="prefix" value="5"/>
        <property name="givenName" value="30"/>
        <property name="familyName" value="25"/>
      </sizeMappings>
      <lineByLineFormat>
        <string>prefix</string>
        <string>givenName</string>
        <string>familyName</string>
      </lineByLineFormat>
      <requiredElements>
        <string>givenName</string>
        <string>familyName</string>
      </requiredElements>
    </org.openmrs.layout.name.NameTemplate> 


  2. Change the nameMappings, sizeMappings, and lineByLineFormat elements however you like.  Restart Tomcat to use the new name layout.
  3. Update the  layout.name.format  Global Property to the custom template's codeName so that it is chosen as the active template.

...