0
我正在运行Expression Engine 2.3.0并使用通道图像添加。解析表达式引擎模板之外的模板标签
该网站的一部分是非常复杂的,我通过插件而不是使用EE的模板逻辑。我实际上得到的是一个CodeIgniter控制器,它使用我指定的EE模板标签在网站上调用。
我想使用通道图像来使我在视图中显示的通道数据看起来更好一些。问题是... Channel Images函数似乎不允许我将它称为PHP。由于EE模板参数。
所以,我决定尝试通过解析器运行模板块。但我没有得到结果。有任何想法吗?或者可能是一个解决方法来直接调用该函数?
<?php $this->EE =& get_instance();
$img_tpl = '{exp:channel_images:images entry_id="'. $item['id'] .'" cover_only="yes"}
<div style="float:left; display:inline; width:125px;">
<a href="{image:url:large}" title="{image:title}"><img src="{image:url:small}" alt="{image:title}" /></a>
<p>{image:description}</p>
</div>
{/exp:channel_images:images}';
$opts = array('');
$img = $this->EE->output->set_output($this->EE->TMPL->parse_variables($this->EE->TMPL->parse_globals($img_tpl), array($opts)));
?>