[英]If else a twig in a row, bug not working standart code
I need a little help, I'm trying to switch to a twig темплате of standard php code.我需要一点帮助,我正在尝试切换到标准 php 代码的 twig темплате。 But something is wrong, although i read the template documentation well.
但是出了点问题,尽管我很好地阅读了模板文档。
My Code我的代码
<?php echo $pr['price'] . ($pr['unit'] ? '/' . $pr['unit'] : ''); ?>
{{ pr.price . pr.unit ? '/' . pr.unit : '' }}
How do you think I can solve the problem with this one-line check, something wrong with the rules and the check?你认为我可以如何解决这个单行检查的问题,规则和检查有问题?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.