Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用magento在右侧显示文本_Magento - Fatal编程技术网

如何使用magento在右侧显示文本

如何使用magento在右侧显示文本,magento,Magento,我编写了一个代码,在magento主页的右侧显示一个文本hello world,但当我浏览到其他链接,如我的帐户、我的愿望列表等时,它消失了。我的问题是如何使用reference name=“right”在每个页面中显示Hello World 当我写入reference name=“content”时,它会起作用。文本显示在块“right”所在的位置,您可以搜索项目中的,并找到页面的右块被删除的位置(我的愿望列表、我的帐户等) 现在,您可以通过删除这些标记来启用此块,或者(推荐)您可以创建自

我编写了一个代码,在magento主页的右侧显示一个文本hello world,但当我浏览到其他链接,如我的帐户、我的愿望列表等时,它消失了。我的问题是如何使用reference name=“right”在每个页面中显示Hello World



当我写入reference name=“content”时,它会起作用。

文本显示在块“right”所在的位置,您可以搜索项目中的
,并找到页面的右块被删除的位置(我的愿望列表、我的帐户等)


现在,您可以通过删除这些标记来启用此块,或者(推荐)您可以创建自己的块并将其添加到layout/page.xml

,因为它将您编写的内容显示为内容。您可以建议,如何立即显示文本吗?如果您使用
,然后在您的
目录/helloworld.phtml
文件中使用它:
。请让我知道这是否有效!!你的意思是这样的:这是我的helloworld.phtml页面它不工作首先写这个:
,然后写
<default>
 <reference name="right">
  <block type="core/template" name="catalog.helloworld" template="catalog/helloworld.phtml" />
 </reference>
</default>