Search code examples
phpsmarty

Separating Smarty If statement


I need a bit of help because I'm new to coding.

How can I separate this Smarty If statement:

{if $val.type=='PutLocker'}
<img src="/templates/svarog/images/stars.gif" title="Fast Streaming"> 
{/if} 

I am specifically referring to this part:

{if $val.type=='PutLocker'}

I want to add another site name after PutLocker so it looks something like this:

{if $val.type=='PutLocker', 'SockShare'}

Solution

  • Something like this:

    {if $val.type == 'PutLocker' || $val.type == 'SockShare'}
    <img src="/templates/svarog/images/stars.gif" title="Fast Streaming"> 
    {/if} 
    

    See the documentation here.