我已经成功安装了 Fishpig 模块,并且能够显示产品和帖子之间的关联/反之亦然。
但是,我无法显示/输出与博客类别相关的产品。
默认情况下,它们不显示。所以我在 /frontend/default/theme/layout/wordpress.xml 中添加了以下代码:
<wordpress_post_category_view>
<reference name="content">
<block type="wordpress/category_view" name="wordpress_category" template="wordpress/category/view.phtml">
<block type="wordpress/post_associated_products" name="wordpress_associated_products" as="associated_products" template="wordpress/post/associated/products.phtml" />
<block type="wordpress/post_list" name="wordpress_post_list" as="post_list" template="wordpress/post/list.phtml">
<block type="wordpress/post_list_pager" name="wordpress_post_list_pager" as="pager"/>
</block>
</block>
</reference>
</wordpress_post_category_view>
我正在尝试通过 /frontend/default/theme/template/wordpress/category/view.phtml 调用该块
<?php echo $this->getChildHtml('associated_products'); ?>
同样的技术适用于博客文章页面,但它似乎不适用于博客类别。有任何想法吗 ?