I need to display some images from a folder depending on its {{ name }}
.
The names of my files look like this:
Now I need to do something with the blurred-image. This is what I tried, but no success:
{{ files:listing folder='1' }}
{{ if { helper:strpos haystack='[[ name ]]' needle='_blur' } }}
{{ files:image id='{{ id }}' }}
{{ endif }}
{{ /files:listing }}
Currently it just does nothing. It seems that the strpos
returns allways false
. Any ideas what I'm doing wrong?
Got it by myself, thanks to Leon Stafford:
Just remove the brackets [[ ]]
and its surrounding quotes
{{ files:listing folder='1' }}
{{ if { helper:strpos haystack=name needle='_blur' } }}
{{ files:image id='{{ id }}' }}
{{ endif }}
{{ /files:listing }}