I am using EE v2.5 and following the documentation from https://docs.expressionengine.com/v2/templates/conditionals.html
I am trying to create an If Statement where if the Channel field labelled 'title' starts with the word 'Weld', it outputs something.
The title outputs on it's own as 'Weld Quip'
My code is:
{exp:channel:entries show_expired="yes" show_future_entries="yes" channel="service_agent_distributor" limit="1" url_title="weld-quip-group-pty-ltd"}
{if "{title}" ^= 'weld'} some text {/if}
{/exp:channel:entries}
I have also tried to create statement based on segments like this:
{if segment_2 ^= "weld"} Some text {/if}
I get a blank screen with one error: Parse error: syntax error, unexpected 'FALSE' (T_STRING) in /public_html/clients/projectname/area51/expressionengine/libraries/Functions.php(683) : eval()'d code on line 350
If I remove the 'if' statement it works again. Does anyone know why it wouldn't be working?
I should point out that this works, but I need the 'starts with' conditional to work.
{if segment_2 == "weld"}HELLO WORLD {/if}