last day (99 days later) »
Matt
6:27 PM
Hello
I can't be 100% responsive because I'm at work. But I can do my best.
Mojtaba Reyhani
Hello, Nice to meet you ;)
Matt
nice to meet you as well
Mojtaba Reyhani
I use it quite straightforward in my template.
Matt
Yeah your code looks fine
try using {% if 'Android' in content.field_app_os|field_value %}
This will check if Android appears anywhere in the string
Mojtaba Reyhani
Thanks, I test it, doesn't it work.
Matt
6:36 PM
What do you get when you do {{ dump(content.field_app_os|field_value) }}
Mojtaba Reyhani
doesn't show anything.
I think this error refers to the module.
Matt
6:51 PM
Yeah there's your problem
It's not the comparison
It's the field
What happens when you do just {{ content.field_app_os }}
Mojtaba Reyhani
When I use {% if content.field_app_os %}, thats work correctly.
Matt
yeah I don't think you're supposed to do |field_value
So do you have it working now?
Mojtaba Reyhani
When I use {% if 'Android' == content.field_app_os %} this also not works.
Matt
What does {{ content.field_app_os }} product?
produce*
Mojtaba Reyhani
displays "Android".
Matt
7:08 PM
{{ content.field_app_os }} produces android but {% if content.field_app_os == 'Android' %} It worked {% endif %} doesn't work?
Mojtaba Reyhani
No, Doesn't work.
Matt
Don't know what to tell you then. Something is very wrong is a variable is Android but does not equal Android
Mojtaba Reyhani
I confused totally.
last day (99 days later) »
all rooms
Transcript for
Sep '17
28
Jan
5
Mojtaba Reyhani and Matt chat
discussing a specific issue
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile