【发布时间】:2017-07-11 06:28:51
【问题描述】:
我正在尝试将 Disqus 集成到我的测试 Magento 网站上。我正在使用 NeoTheme 博客扩展,但是我禁用了内置评论部分并将其更改为 disqus。
问题在于规范网址。我有一个主类别http://?????.com/news-and-media/,它有一个子类别 /blog 和 /news 等。博客页面可以通过http://????/.com/news-and-media/blog-content 和http://????/.com/news-and-media/blog/blog-content 访问,都显示相同的内容。我尝试对每个 url 发表评论,但是其他页面中缺少评论,反之亦然。
这是我目前的进步。
我的 phtml
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = 'http://?????.com/news-and-media/';
this.page.identifier = 'blog';
};
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://????-com.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
我的 local.xml
<neotheme_blog_post_index>
<reference name="disquscomment">
<block type="core/template" name="dcomment" template="disqus-comments.phtml" />
</reference>
</neotheme_blog_post_index>
您对此规范有解决方案吗?我似乎无法理解文档和示例。
https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables
【问题讨论】:
-
您是否在后端设置了规范?
-
是的,我手动将其添加到设计布局 xml 中。
标签: javascript php magento disqus