Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL Metafield Doesn't Return as String #1505

Open
wickcreative opened this issue Jan 13, 2022 · 1 comment
Open

URL Metafield Doesn't Return as String #1505

wickcreative opened this issue Jan 13, 2022 · 1 comment

Comments

@wickcreative
Copy link

I have a "URL" type Metafield, which according to the documentation should return a string. However, it does not appear to do so:

{%- if collection.metafields.url.link contains 'http' -%}

Will not return true. However, if I first "stringify" it (in this case by downcasing):

{%- assign url = collection.metafields.url.link | downcase -%}
{%- if collection.metafields.url.link contains 'http' -%}

Will now return true. So what is being returned is not a string, but I am unsure what it would be.

@NebularNerd
Copy link

Thanks for this, I thought I was going crazy. Not sure what the logic is behind that but this workaround does the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants