【问题标题】:Liferay 6.2 Custom Font family in email notificationsLiferay 6.2 电子邮件通知中的自定义字体系列
【发布时间】:2015-01-16 18:54:39
【问题描述】:

我想知道如何更改电子邮件通知正文的字体系列。

关于一般邮件通知,控制面板编辑器不提供这种可能性。

关于工作流邮件通知和其他 portlet 邮件通知 像留言板或日历,我仍然认为没有这种可能性。

任何帮助将不胜感激。

【问题讨论】:

    标签: liferay liferay-6 liferay-ide


    【解决方案1】:

    问题相当棘手,但我们找到了可行的解决方案。我们设法在我们的项目中使用 kaleo 工作流通知解决了这个问题。我假设您已经了解如何使用 kaleo,因此这里只是我们的工作流定义中使用的代码的一部分,负责在用户采取的一项操作中进行电子邮件通知。

        <notification>
                    <name>Creator Modification Email Notification</name>
                    <description>[Rejection] Your article has been rejected.</description>
                    <template>
                        <![CDATA[
                        <html>
                            <head><style>table, th, td {border: 1px solid black; border-collapse: collapse;}th, td { padding: 5px;text-align: left;}</style><head>
                            <body>
                                <p>Lorem ipsum...</p>
                                ###....
                                ##some settings removed to make it look more clear
                                ##
    
    
                                <table>
                                    <tr><th colspan="2"><b>Some information about rejected article</b></th></tr>
                                ## another information removed to make it look more clear for you
                                </table>
                            </body>
                    ]]>
                    </template>
                    <template-language>velocity</template-language>
                    <notification-type>email</notification-type>
                    <execution-type>onAssignment</execution-type>
                </notification>
    

    如您所见,我们使用 html 来呈现此通知电子邮件。标题部分还包含部分 css,以使其对最终用户看起来更优雅。添加更多指定的css样式(包括字体等)应该没有问题。

    顺便说一句:确保将此工作流定义上传为xml,因为半年前有一个错误,即清除所有特殊字符的定义,最后你没有能够使用这样的模板。这仍然可以使用他们的 liferay 上传器并使用您的 workflow_definition.xml 文件。我希望我能以某种方式帮助你,解决这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-07
      • 2014-01-02
      • 2019-10-31
      • 1970-01-01
      • 2023-01-09
      • 2019-01-13
      • 1970-01-01
      相关资源
      最近更新 更多