【发布时间】:2022-01-07 17:04:07
【问题描述】:
我的主页面包含以下代码:
function onStart()
{
// ...
// $result => Response of an API
$this['prices'] = $prices;
}
function onAjax()
{
// ...
// $result => Response of another API
$this['products'] = $products;
}
我的 AJAX 部分是:
{% for product in products %}
<div id="price">
{{ prices[product.name] }}
</div>
{% endfor %}
但它无法读取prices 变量。我怎样才能通过?
【问题讨论】:
-
您好,您使用的是哪个版本的 OctoberCMS?基于此,我们可以正确指导您..
标签: octobercms