0

我需要在我的 Magento 网站 tamween.biz 的顶部横幅中添加一个阴影效果 png 图片,我可以在我的本地服务器上使用 firebug 通过在正确的编码区域添加一个新类来执行此操作,并且我已经在bootstrap.css 文件。

这次测试很成功,问题是我不知道在服务器中哪里可以找到真正的HTML文件来编辑这些更改?

4

4 回答 4

1
  1. 调用图像的 HTML 代码在root/app/design/frontend/<package>/<theme>/template/page/html/header.phtml
  2. 图像的路径存储在System => Configuration => General => Design => Header => Logo Image Src
  3. 任何皮肤位于root/skin/frontend/<package>/<theme>/css
于 2014-09-08T18:10:35.423 回答
0

如果您已经创建了自定义主题,请转到

root/app/design/frontend//yourtheme/template/page/html/header.phtml

如果没有,那就去

root/app/design/frontend/base/default/template/page/html/header.phtml

和 n 搜索

 <img src="<?php echo $this->getLogoSrc() ?>">

这是输出图像的代码。您可以向其中添加 css 类。

于 2014-09-09T06:48:25.120 回答
0

在 magento 中转到系统 - > 配置并设置模板提示是的。

这样,您将看到静态块来自的每个模板部分。

于 2017-03-19T19:44:19.560 回答
0

Magento HTML 页面由块组成,每个块都有一个模板文件。要找出每个块模板文件的位置,您可以将一些代码添加到核心并在完成后将其删除。

打开app/code/core/Mage/Core/Block/Template.php:241。这应该在方法中fetchView,然后将具有include代码的行编辑为以下

        if (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks()) {
          echo "<!-- template hint start\n";
          echo $includeFilePath."\n";
          echo get_class($this)."\n";
          echo "-->";
            include $includeFilePath;
          echo "<!-- template hint end\n";
          echo $includeFilePath."\n";
          echo get_class($this)."\n";
          echo "-->";
        } else {

这将添加 HTML 注释,告诉您模板文件路径以及$this在该上下文中的含义。

参考

于 2017-03-19T08:23:02.850 回答