-
Notifications
You must be signed in to change notification settings - Fork 131
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
Would appreciate rewording on toggle.md #465
Comments
should output
if you have Is that not happening? Maybe there's a bug? |
Thanks for replying back Jason! I really appreciate it! To make things clear I'll try to describe the scenario where I've used the toggle. I'm using the toggle for an asset field where I upload screenshots which has two variations (mobile and desktop) When I try to fit mobile thumbs within desktop thumb canvases they just look terrible :( Basically when the switch is toggled off the thumb sizes are 300x300. The other way is 300x500. So I've assumed that I might needed to include else in my template. But to double check your suggestion I've just did this,
This ended up doubling the thumbnails. And previously I've tried these.
This just ended up breaking the whole site. Also tried the combinations with just {{ else }} and {{ endif }}
Again, all got broke.
Broke again Also I should mention I'm professional developer. So there's a huge chance that it might be just my sloppy coding at somewhere 😅 If so, I'm sorry for taking your time! |
When the switch is on (to the right, green) the value of your variable will be Assuming your
I think you've just had your logic backwards. Also, Also, I would recommend naming the variable something that implies the "on" state. Like Completely aside, when there's a responsive thing at play I would generally render both and then use a media query or other CSS method to show the appropriate one, or I would just render the big one and crop it using |
Creating the issue upon @jackmcdade's suggestion from here #464
Also, I was blindly trying just now and could able to work it with {{ unless }}.
Haven't used true of false (or not sure if unless is the right one to use) but it this one worked for my case :p
The text was updated successfully, but these errors were encountered: