Skip to content Skip to footer navigation
You are reading the docs for an old version of Statamic. Consider upgrading to Statamic 6.

Ensure Left Modifier

Ensures that the string begins with a specified string. If it doesn't, it will now.

links:
- statamic.com
- http://wilderborn.com
{{ links }}
<li>{{ value | ensure_left('http://') }}</li>
{{ /links }}
@foreach ($links as $link)
<li>{{ Statamic::modify($link)->ensureLeft('http://') }}</li>
@endforeach
<li>http://statamic.com</li>
<li>http://wilderborn.com</li>