Magento 主题
我已经阅读了 Magento 电子商务网站上的所有文档,但我仍在与 Magento 斗争以使我的主题看起来恰到好处。 我对 XML 文件布局文件有基本的了解,但所有模板代码都让我感到沮丧。 有人可以解释一下基本标签,并提供一两个参考资料,让我可以在哪里了解更多信息吗?
I've read through all the docs on the Magento E-Commerce website, but I'm still fighting with Magento to get my theme looking just right. I have the basic understanding of the XML file layout files, but all the template code is frustrating me. Can someone explain the basic tags and maybe give a reference or two on where I can learn more?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
与 Justin Lawrence 所说的类似,我建议您查看 Firebug Firefox 插件。
该插件允许您即时查看和更改 CSS,这样您就可以看到对每个元素所做的更改,而不会破坏原始样式。 您还可以使用内置工具来找出页面上每个元素的用途,以及专门应用于该元素的样式,包括继承。
我建议阅读 本教程使用 Firebug 重新设计 CMS 主题。
Similar to what Justin Lawrence said, I would recommend checking out the Firebug Firefox add-on.
This add-on allows you to view and change CSS on the fly, so that you can see what changes you make to each element without destroying your original styles. You can also use the built-in tools to find out what each element on the page does, and what styles apply specifically to that element, including inheritance.
I recommend reading this tutorial for using Firebug to redesign a CMS theme.
是的,magento 主题绝对是最大的进入障碍,但我发现这里有一些有用的东西:
伙计,我希望他们能在 Magento 的这一方面工作。 实际上,一旦你掌握了它的窍门,这一切都是有道理的,而且它非常聪明,因为该系统被设计为易于升级,尽管有定制。 也许巫师可以作为开始。
Yeah, the magento theming is definitely the hugest barrier-to-entry, but here are some things i found helpful:
Man, I wish they'd work on this side of Magento. It actually all makes sense, once you get the hang of it and it's very clever as the system is designed to be easily upgradeable, despite customisations. Perhaps a wizard might be in order as a start.
您可以通过以下方式打开模板和块提示:
配置-> 开发者
,从“当前配置范围”中选择“主网站”。 然后打开“模板路径提示”和“将块添加到提示”不要在生产中执行此操作。
这将在每个框周围添加一个提示,指向该块正在使用哪个模板文件。
You can turn on Template and Block Hints by going to:
Configuration -> Developer
, select "Main website" from "Current Configuration Scope". Then turn on "Template Path Hints" and "Add Block to Hints"Don't do this in production.
This will add a hint around each box pointing to which template file is being used for that block.
不幸的是,magento 受到其糟糕的文档和过时的 wiki 的困扰。
恐怕查找有关此主题的任何信息的最佳地点是 magento 论坛社区。
另外,我建议使用他们的空白主题。 由于它的设计非常“清晰”,因此更容易修改。
Unfortunatly magento suffer's from it's poor documentation and outdated wiki.
I'm afraid that the best place for finding any info on this topic is magento forum community.
Also, I'd suggest to use their blank theme. It's easier to modify since it's pretty "clear" design.
另一个捷径是购买库存的 Magento 模板和模板。 看看他们是如何完成覆盖、布局文件等操作的。
另外一个好的技巧是研究使用 local.xml 布局 - 这是一种将各种布局更新集中到一个文件中的方法,而不是让它们分布在所有文件中各种布局,如目录、客户等。
有关 local.xml 的教程,请参阅 classyllama
Another shortcut is to buy a stock Magento template & look at how they've done things like overrides, layout files, etc.
Also another good tip is to investigate using local.xml layout - its a way to centralise your various layout updates into one file, rather than having them spread out across all the various layouts like catalog, customer, et.
For a tutorial on local.xml , see classyllama