Smarty help, expression If one string contains another string

I am new to smarty, tried to look up its syntax for something like in php stripos but came up empty… How to do that?


$a is “wwwweeew”

$b is “eee”

need to check is $b is in $a…


EDIT: Found about implicit modifiers like:

{if $po.option_name|stripos:"camera"}

However, how do you pass other values to the function if the function takes more parameters?

Multiple colon separated values. Syntax is:

“|” - use a modifier

“name of function”

“:” argument 1

“:” argument 2


Note that some modiifers are “built it”. If not “built-in” then a “if( function_exists('name_or_function”) ) is done so things don’t blow up from typos.