Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Configuring Components

    To configure components, you must have one of the following roles:
    • General System Administrator
    • Letter Administrator
    The Components Configuration page (Configuration Menu > General > Letters > Components Configuration) allows you to customize templates and other components shared between letters. Components can be made up of labels and/or the template (XSL style sheet). Available actions include editing the component, customizing a label, and editing a template.
    Components Configuration.png
    Components Configuration

    Configuring Component Labels

    You can configure the labels associated with components. Select Edit on the row action list of the component. The Labels tab is displayed by default.
    The following options are available on the row actions menu:
    • Edit - Opens the label line to edit the Enabled switch and the Description field.
    • Language change - If another language is configured, the Translation field opens for editing.
    • Restore - If the line was modified, the Enabled and Description fields are restored to their default.
    • Restore Translation - If another language is configured and the Translation label was modified, the field is restored to the default.

    When done, select Save. You can also enable or disable the label by adjusting the slider.

    Customizing Component Templates

    You can view and edit the template (XSL style sheet) that is used to format the component and determine which fields and text appear in the letter. Configure the template to customize what and how labels and data appear in the letters. In addition, you can use XSL conditional statements to make decisions about what appears in a letter, and even whether the letter is sent. For an example, see How to use the if condition to configure a letter to not be sent under certain circumstances.docx.
    To customize a component's template (XSL style sheets):
    1. To open the template, find the desired component on the Components Configuration page, select Edit on the row action list of the component, then select the Template tab.
      The XSL and header information appear in a configuration pane.
      Letter Template.png
      XSL Template Page
    2. Customize the XSL of the component as required. The available fields on this page are in the labels associated with the component and the XML fields that are generated by Alma.
      The following examples show what you can do with XSL to customize the output of your components:
      • Use the substring and string-length functions to output the last four digits of a code:
        <b>@@requested_for@@ :*****
        <xsl:value-of select="substring (notification_data/user_for_printing/identifiers/code_value/value,string-length(notification_data/user_for_printing/identifiers/code_value/value) - 3)"/></b>
      • If the following snippet follows the address line in the SenderReceiver.xsl file, you can ensure that the user’s phone number is included in all the letters that use this template.
        <td><xsl:value-of select="notification_data/user_for_printing/phone"/></td>
      • Have the name of the style sheet appear as hidden text in the output by adding the following after the <html> tag.
        <html> <xsl:attribute name="data-filename"> <xsl:value-of select="/notification_data/general_data/letter_type"/> </xsl:attribute>
        The output will include something like:
        <html data-filename=”FulLoanReceiptLetter”> ...
    3. Select Save to save your customizations.
    If you use a tag to refer to an outside location such as a template or URL (for example, <xsl:include href="http://{$PathToWeb}/html/xsl/head.xsl">) and the outside source changes, refresh the XSL (by re-saving it) for the new information to be included in the letter.

    Component List

    The following table lists the components available in Alma.
    Letter Components
    Letter Description
    checksum_calc.xsl For internal use

    Defines the text used in the footer for all letter emails. Define the following in General > General Configuration > Other Settings:

    Parameter Value Parameter Key
    contact_us email_contact_us
    my_account email_my_account
    header.xsl Defines the text (such as your institution's logo, the letter name, and the date) used in the header for all letter emails.
    mailReason.xsl Defines the greeting (such as Dear Sir/Madam) used in most letter emails. The following would print Dear John Smith for a user named John Smith:

    <xsl:template name="toWhomIsConcerned">
    <table cellspacing="0" cellpadding="5" border="0">
    <xsl:for-each select="notification_data">
    <h3>@@dear@@ &#160;<xsl:value-of select="receivers/receiver/user/first_name"/>&#160;<xsl:value-of select="receivers/receiver/user/last_name"/></h3>

    recordTitle.xsl Defines the text used for bibliographic details in letter emails.

    Defines the address information for all letter emails. This component uses <xsl:value-of select="notification_data/user_for_printing/name"/>, which is populated according to the configuration in User Name Display. However, user_for_printing also includes the name and preferred name values, so it can be configured differently. For example, from the activity report XML's user_for_printing:

    <identifiers><code_value><code>Primary Identifier</code>
    <name>Prefecta, Forda</name>

    SMSRecordTitle.xsl Defines the text used for bibliographic details in SMS letters.
    style.xsl Letter Defines the CSS used for all letter emails.