magento 自定义主题
我是 magento 的新手。 我想要一个带有我的徽标的黑色背景标题的主题,页脚中的深灰色图像,上面有一些文本,中间有一个空白的黑色区域。
有人可以建议我吗我应该如何开始。现在我正在使用默认主题并更改 styles.css 以及页眉和页脚 html 文件。但不知怎的,它并没有按照我想要的方式工作,这是否是正确的方式。
请帮帮我。 提前致谢。
I am a newbie in magento. I want to have a theme with a black background header with my logo, a dark grey image in the footer with some text on it and in the middle a black coloured area that is blank.
Can someone suggest me how should I start. Right now I was using the default theme and changing the styles.css and header and footer html files. But somehowe its not working the way I want it to be and will this be the right way.
Please help me out.
Thanx in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您最好阅读所有有关主题和模板的教程,要学习如何让一切都在您自己的控制之下,需要学习很多知识。
您可以做的是在扩展数据库中搜索免费主题/模板,安装它们并测试它们以找到足够接近的主题/模板。然后重新设计需要改变的部分。
哦,顺便说一句,如果缓存管理已激活,您可能看不到更改。
You better read all the tutorials about themes and templates, it's quite a lot to learn to get everything under your own control.
What you could do is to search for free themes/templates in the Extensions database, install them and test them to find one that's close enough. Then redesign the part you need to change.
Oh, BTW, if the cache management is activated you might not see the changes.
您可以从 magento 扩展下载空白主题[1]。它只是一个线框。您可以根据需要扩展主题。它与magento 1.4版本兼容。
You can download a blank theme from magento extensions[1].It is just a wireframe.You can extend the theme as you like.It is compatible with magento 1.4 version.
您好,您想要在 magento 自定义主题开发 中进行的更改只是/skin/frontend/package/themename/css/ 中的一些 css 更改
可以更改页眉和页脚,只需将图像放入 /skin/frontend/package/themename/images/< /strong> 并在 styles.css 中进行更改
,对于正文部分,您需要正确放置块,我的意思是您需要创建一些静态块并将其放置在 CMS 页面的 XML 布局更新部分中。对于自定义更改,您需要以.phtml文件格式创建自定义块,然后需要在XML文件中提供参考,主要使用catalog.xml文件作为参考,只需检查/app/design/frontend /package/themename/layout/catalog.xml 您将了解如何在那里引用块和 phtml 文件,并且您必须在 /app/design/frontend/package/themename/template/ 中创建 phtml 文件。 ...
谢谢
Magento 开发
Hello the changes you want to do in magento custom theme development are just few css changes in /skin/frontend/package/themename/css/
to do changes in header and footer you just place the images in /skin/frontend/package/themename/images/ and do your changes in styles.css
and for body part you need to place blocks properly, i mean you need to create some static blocks and place it in XML layout update section of CMS pages. and for custom changes you need to create custom blocks as in format of .phtml files and then need to give reference in XML files, mainly catalog.xml files is being used for the reference, just check /app/design/frontend/package/themename/layout/catalog.xml you will understand how blocks and phtml files are referenced there, and you must create phtml files in /app/design/frontend/package/themename/template/....
Thanks
Magento Development
好吧,我不是 magento 高手,但这是我在处理一些自定义主题后所理解的。我会尽力让它尽可能简单。
但当然,不言而喻:阅读主题教程……从长远来看,它确实很有帮助。
通常在每个主题中,每个页面基本上分为三个部分:页眉部分、页面部分和页脚部分。
注意:最好创建您自己的自定义界面和主题,并将 header.phtml 或 footer.phtml(包含所有容器文件夹)复制到其中进行编辑。
header 部分由 header.phtml 文件填充,该文件位于 app/design/frontend/interfacename/themename/template/page/html/header.phtml header.phtml
包含一个主 div,您可以在其中放置另一个 div为您的标志。
header.phtml 及其中包含的 div 的样式是通过 Skin/frontend/interfacename/themename/css/styles.css 中包含的 styles.css 完成的
问题 1:要获得黑色标题,您可以更改主 div 的颜色在 header.phtml 中并确保它拉伸到 100%。这显然是通过将 css 代码放入 styles.css 中完成的。
问题 2:中间黑色区域:可以通过向 body 标记添加黑色(当然使用 styles.css)来将整体黑色添加到网站。标题将在其上方可见。
QUESTION3:FOOTER图像:
页脚是由app/design/frontend/interfacename/themename/template/page/html/footer.phtml下的footer.phtml生成的,
通过样式将使用css的背景图像应用到footer.phtml中的主div。 css 就可以了。
穆迪
Well, im no magento whiz kid but this is what ive understood after working on some custom themes. Ill try and make it as simple as possible.
But ofcourse, it goes without saying: read themeing tutorials.. it really helps in the long run.
Normally in every theme, every page is basically divided into three sections : the header section, the page section and the footer section.
Note: it is always better to create ur own custom the interface and theme and copy header.phtml or footer.phtml (with all container folders) to it for editing.
The header section is populated by the header.phtml file which can be found under app/design/frontend/interfacename/themename/template/page/html/header.phtml
The header.phtml contains a main div within which you can position another div for your logo.
The styling of the header.phtml and the divs contained within it is done through styles.css contained within skin/frontend/interfacename/themename/css/styles.css
QUESTION1: For getting a black header you can change the color of the main div in header.phtml and make sure it stretches to 100%. This obviously is done putting css code in styles.css
QUESTION2: Middle black coloured area: an overall color of black can be added to the website by adding black color to the body tag (using styles.css ofcourse). The header will be visible above it.
QUESTION3: FOOTER image:
The footer is generated by footer.phtml under app/design/frontend/interfacename/themename/template/page/html/footer.phtml
Apply a background image using css to the main div in footer.phtml through styles.css and you should be good to go.
Moody
作为第一条规则,我建议您,永远不要更改默认主题!
如果你需要修改你的主题,你需要做两件事
1) 使用 XML 注册你的 css
2)用你的css创建一个文件夹并激活你的主题
这里有一个很酷的视频https:// /tutsplus.com/tutorial/magento-up-and-running/ 您可以在其中了解更多有关具体信息的信息,
祝您好运!
As first rule let me advice you, never change the default theme!
If you need to modify your theme you'll need to do 2 things
1) register your css by using XML
2) create a folder with your css and activate your theme
there's a cool video here https://tutsplus.com/tutorial/magento-up-and-running/ where you can learn more about the specifics
good luck!
由于我看不到设计,我只能说有一个关于 Magento 的漂亮 视频 Tutplus 中的主题,它基本上教您如何将块从一个容器移动到另一个容器以及如何设置主题文件夹和主题样式。
这里有另一个 Magento 教程
Since I can't see the design, all I can tell is there's a nice video about Magento Theming in Tutplus, it basically teach you how to move blocks from one container to another and how to set your theme folder and style the theme.
Here you have another Magento Tutorial