systopia / CiviProxy

A security proxy for CiviCRM
GNU Affero General Public License v3.0
7 stars 18 forks source link

CiviProxy with Mosaico #19

Closed pbatroff closed 4 years ago

pbatroff commented 6 years ago

If CiviProxy is used with Mosaico (2.x), the social network icons wont work out of the box, since they are shipped within the extension and the links wont be parsed/changed by CiviProxy. Thus the icons wont be shown correctly.

A good solution is to move the icons to civicrm/persist/, and replace the URL in the template. Below is an example:

<span data-ko-display="twVisible" data-ko-wrap="false">&nbsp;</span>
    <a data-ko-display="twVisible" href="" style="-ko-attr-href: @twUrl">
        <img src="https://example.com/sites/default/files/civicrm/persist/socialMedia/twitter_ok.png" alt="Twitter" border="0" class="socialIcon" />
    </a>
pbatroff commented 4 years ago

works better if a mosaico template directory is specified and moved to [civicrm-files]/persist/mosaico_tpl (see #37 )