I have a grid called "attachments" with 2 fields. They can enter either a File or they can enter a video url through a simple text field. Any idea what I'm doing wrong?

However, when I try to create an href it gets all messed up for some reason and creates markup such as

<a href="a href=" https: www.youtube.com watch?etc">https: www.youtube.com watch?etc</a>"">testURL"

I've verified the value without the and it spits out the url like it should, and I checked the field to make sure None was set for text formatting.

Here's my code:

  {if attachments:image_file != ""}
       <a href="{attachments:image_file}">testImg</a>
  {if:elseif attachments:video_url != ""}
       <a href="{attachments:video_url}">testURL</a>
  • I'm using these for fancybox just so you know, that's why they are hrefs so they open in modals part of a group
    – Chief
    Apr 2, 2017 at 2:25

1 Answer 1


There's a setting in your channels​ preferences that you can toggle to automatically convert urls to links.

Find that setting and turn it off.

  • perfect... totally forgot about that setting, thank you!
    – Chief
    Apr 2, 2017 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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