systopia / de.systopia.moregreetings

CiviCRM Extension for additional greetings
GNU Affero General Public License v3.0
4 stars 10 forks source link

Provide substring functions for template #3

Closed bjendres closed 6 years ago

bjendres commented 7 years ago

We want the following functions to be available in (our) smarty interpreter:

Those should return TRUE or FALSE so we can use them as conditions.

bjendres commented 7 years ago

I have implemented those as modifiers. Usage example:

{if $contact.formal_title|mg_startswith:'Dr'}
  Somestuff
{else}
  Otherstuff
{/if}

p.s. thanks to @totten for pointing this option out to me :)