Ruby on rails 自定义Spree主页

Ruby on rails 自定义Spree主页,ruby-on-rails,spree,Ruby On Rails,Spree,我在RubyonRails应用程序中运行Spree,并且使用Spree_fancy主题(如果有必要的话)。这就是它看起来的样子: 正如你所看到的,这里有这样一段文字:“欢迎来到我们的神奇商店!选择你所拥有的任何东西,我们将把它运到任何地方!” 我想修改那里显示的文本并添加一些其他标记 我从github下载了spree源代码,基本上在调用route url时会加载一个主控制器: #frontend/config/routes.rb root :to => 'home#index' #fr

我在RubyonRails应用程序中运行Spree,并且使用Spree_fancy主题(如果有必要的话)。这就是它看起来的样子:

正如你所看到的,这里有这样一段文字:“欢迎来到我们的神奇商店!选择你所拥有的任何东西,我们将把它运到任何地方!”

我想修改那里显示的文本并添加一些其他标记

我从github下载了spree源代码,基本上在调用route url时会加载一个主控制器:

#frontend/config/routes.rb
root :to => 'home#index'

#frontend/controllers/spree/home_controller.rb
def index
  @searcher = Spree::Config.searcher_class.new(params)
  @searcher.current_user = try_spree_current_user
  @searcher.current_currency = current_currency
  @products = @searcher.retrieve_products
end

 #views/spree/home/index.html.erb
 <%= render :partial => 'spree/shared/products', :locals => { :products => @products } %>

 #spree/shared/_products.html.erb
 ...
#frontend/config/routes.rb
root:to=>'home#index'
#前端/controllers/spree/home_controller.rb
def索引
@searcher=Spree::Config.searcher\u class.new(参数)
@searcher.current\u user=try\u spree\u current\u user
@searcher.current\u currency=当前\u currency
@产品=@searcher.retrieve\u产品
结束
#views/spree/home/index.html.erb
'spree/shared/products',:locals=>{:products=>@products}%>
#spree/shared/_products.html.erb
...
基本上,我遵循了整个调用序列,在任何地方都找不到包含此文本的视图(我高度怀疑它是否存储在数据库中)


包含此主页信息的视图在哪里?

您可以在spree\u fancy中找到主页的源:

替换此内容有两个选项:

  • 用于自定义此内容
  • 将视图从spree_fancy复制到您的应用程序@app/views/spree/home/index.html.erb并自定义内容

  • 这两个选项在

    中有更详细的描述。您可以在spree_fancy中找到主页的来源:

    替换此内容有两个选项:

  • 用于自定义此内容
  • 将视图从spree_fancy复制到您的应用程序@app/views/spree/home/index.html.erb并自定义内容

  • 这两个选项在

    中有更详细的描述是的,难怪spree_fancy有自己的模板。你知道他们是否在使用css网格系统吗?我注意到当我检查css时,我看到很多类,称为第三列、第四列、第五列等等。所以我想知道它们是否使用了流行的网格系统。是的,难怪spree_fancy有自己的模板。你知道他们是否在使用css网格系统吗?我注意到,当我检查css时,我看到很多类,称为第三列、第四列、第五列等等,所以我想知道它们是否使用了流行的网格系统。