This is an old post. Information here may be out-dated, or the post may re­flect opin­ions or be­liefs I no longer share.

This keeps trip­ping me up!

I use liq­uid tem­plates a lot. In a capture block, the re­sult of any op­er­a­tion will al­ways be a string.

If you call a cus­tom short­code writ­ten in JavaScript that re­turns a boolean, the cap­ture block would con­vert that to "true" or "false".

Then, if you check for truthy-ness of the cap­tured vari­able down the line, you've got to com­pare it with a spe­cific string: capturedVariable == "true"

Webmentions (?)

Published web­men­tions (
0 likes, 0 replies, 0 men­tions, 0 re­posts