Contains Modifier |
Plugin |
A Smarty modifier to find a string inside of a string easily.
Originally posted at the Smarty Forum by user JasonDS. See, http://www.smarty.net/forums/viewtopic.php?t=10384. Upload into your /plugins/ directory.
Notes: Not Tested in CMS Made Simple 2.0
Also, it is better to use PHP inside of a User Defined Tag or preg_match directly in your template. For example,
{if preg_match('/(StringA|StringB|"And String C")/i', $VariableToSearch)}
//assign a var or do something here
{/if} |