2013-06-24 47 views
0

我在Rails應用程序的ruby中運行Spree,我使用的是spree_fancy主題(如果有的話)。這是什麼樣子:「歡迎來到我們的商店驚人任何選擇你,我們要到別的地方出貨!」自定義Spree主頁

enter image description here

正如你所看到的,有這文字

我想修改那裏顯示的文本並添加一些其他標記。

我下載的大禮包源代碼從GitHub,並且基本上沒有調用路徑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 
... 

基本上,我跟着整個調用順序,我找不到視圖包含此文本的任何地方(我非常懷疑它存儲在數據庫中)。

哪裏是包含此主頁信息的視圖?

回答

3

你可以找到在spree_fancy主頁這裏來源:

https://github.com/spree/spree_fancy/blob/97ca1c823979871f5cf16f0b6cd1d5ddca960cb6/app/views/spree/home/index.html.erb#L8

您有更換此內容兩種選擇:

  1. 使用Deface定製此內容
  2. 將視圖從spree_fancy複製到您的應用程序@app/views/spree/home/index.html.erb並自定義內容

這兩個選項中有更詳細的Spree Developer View Customization Guide

+0

是的,難怪描述,spree_fancy有自己的模板。你碰巧知道他們是否正在使用CSS網格系統?我注意到,當我檢查CSS時,我看到很多叫做第三列,第四列,第五列等的類。所以我想知道他們是否正在使用流行的網格系統。 – JohnMerlino

+0

是的。他們使用骨架CSS網格系統。 http://www.getskeleton.com/ – gmacdougall