spree_fancy页脚图像更改

时间:2015-02-16 04:45:39

标签: ruby-on-rails-4 spree spree-auth-devise

我正在创建一个狂欢应用程序。我想更改页脚图像,但我无法理解为什么我无法访问页脚四列中的图像标记。有没有办法改变页脚图像?另一个是,图像源无法找到图像。提前谢谢。

我的update_footer是:

Deface::Override.new(:virtual_path => "spree/shared/_footer",
                     :name => "Change logo",
                     :replace => "div.four.columns img#footer-logo",
                     :text =>
                         '<img id="footer-logo" src="logo.png" alt=" Theme"></img>'
)

页面: enter image description here

1 个答案:

答案 0 :(得分:1)

Deface操作ERB模板本身而不是它们的输出。

页脚中的key line显示以下内容:

<%= image_tag "spree/fancy/logo-white.png", :alt => "Spree Demo Theme", :id => "footer-logo" %>

您的选择器应该是:

:replace => "erb[loud]:contains('footer-logo')"

因为这就是模板中的内容。