如何在主页的左栏中添加图像?
Fiona
问问题
15590 次
2 回答
3
There's a simpler way of doing this:
- in the admin go to CMS->Manage Pages
- select the home page to edit it
- on the left select the second tab(own layout)
- as the layout choose either 3 colum or 2 column with left bar
- in the xml changes field add this:
<reference name="left"> <block type="core/template" name="unique.id" template="callouts/left_col.phtml"> <action method="setImgSrc"><src>imageUrl</src></action> <action method="setImgAlt" translate="alt" module="catalog"><alt>alternative text</alt></action> </block> </reference>
6. in the xml field change "imageUrl" to the address of your image, "alternative text" to the alternative description and unique.id to a unique id like advertisement.banner.left.
于 2009-08-05T22:23:34.483 回答
1
转到 magento 管理站点,选择 System->Configuration->Advanced->Developer 并打开模板标签提示。(确保在当前配置范围下拉列表中选择了您的商店名称)
然后您可以返回您的商店主页,您将能够看到哪个模板用于左列。
修改 .phtml 模板文件并在其中添加您的图像。
于 2009-08-05T03:32:25.913 回答