如何在 magento 的页面上显示面包屑?

发布于 2024-12-18 11:25:55 字数 291 浏览 3 评论 0原文

我想在 1column.phtml 页面上显示面包屑。 我尝试了以下

<?php  echo $this->getLayout()->getBlock("breadcrumbs")->toHtml()?>

但它给了我以下错误。

Fatal error: Call to a member function toHtml() on a non-object

那么我应该怎么做才能在我的页面上显示面包屑呢?

I want to display the breadcrumbs on 1column.phtml pages.
I tried the following

<?php  echo $this->getLayout()->getBlock("breadcrumbs")->toHtml()?>

But it gives me the following error.

Fatal error: Call to a member function toHtml() on a non-object

So what should I do for displaying the breadcrumbs on my pages?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫九 2024-12-25 11:25:55

这个问题在许多论坛中都提出并解决了。我认为这对您有用

文件路径

\app\design\frontend\default\themename\layout\page.xml

查找

<block type="core/profiler" output="toHtml"/>

替换为

<block type="core/profiler" output="toHtml" name="core_profiler"/>

This question is raised and solved in many forums.I think this will work for you

File path

\app\design\frontend\default\themename\layout\page.xml

Find

<block type="core/profiler" output="toHtml"/>

Replace with

<block type="core/profiler" output="toHtml" name="core_profiler"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文