I’m looking for a way to create conditional snippets (or other global reference). Ideally my template markup would look something like this:
{if has_flash}DO-THIS{if:else}DO-THAT{/if}I tried creating a snippet with this code just to see if I can evaluate some PHP and write true or false:
{if <? echo(strstr($_SERVER['HTTP_ACCEPT'], 'application/x-shockwave-flash')) ?> == 'true'}TRUE{if:else}FALSE{/if}This didn’t work and Since I have very little PHP experience, I’m not sure how to write this properly. And if it did work, who to make it into a snippet that also functioned as a conditional - if that’s even possible.
Any thoughts?
[Mod Edit: Moved to the How to forum]