我在电子邮件模板中使用以下代码:
{{block type='core/template' area='frontend' template='email/files.phtml' links=$links}}
Run Code Online (Sandbox Code Playgroud)
这是 phtml 代码:
<?php foreach ($this->getLinks() as $_link): ?>
<p><?php echo $_link; ?></p>
<?php endforeach; ?>
Run Code Online (Sandbox Code Playgroud)
但它不起作用。即使我在 phtml 中除了循环之外写了一些东西,也没有显示出来。