I have a grid field (files), with a column/variable (file). I just need to display my content/snippet if a file has been uploaded.

So something like:

{if files:file}link to my file{/if}

Any help is appreciated.


Do it exactly like you think.

{my_grid_field} {if my_grid_field:column}{my_grid_field:column}{/if} {/my_grid_field}

  • Thank you for this! I was trying to get it to work by displaying a snippet, but for some reason that does work: {if files:file}{my_snippet}{/if}. Is it not possible? – ZEDG May 27 '15 at 20:35

I worked this out by doing this

{if files}{my_snippet}{/if}

And then in my snippet

<a href="{files:file}">{files:file_name}</a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.