4

按照教程的建议,我已经成功地从其他页面中删除了 body_content_title。但是,在博客主页上,我似乎无法让标题消失。我已尝试根据常见问题解答将 :body_content_title 设置为 null,但这似乎不起作用。

<% content_for :body_content_title => ""%>

查看 index.html.erb 视图,似乎标题信息包含在该行中

<% content_for :body_content_left do %>

但我似乎无法找到 :body_content_left 的信息在哪里输入/呈现。任何帮助解决这个问题将不胜感激!

感谢您阅读本文,DC

4

1 回答 1

8

我已经被困了几个小时了,我想出了如何解决它。

我正在使用炼油厂博客版本 2.0.4

我所做的是覆盖索引文件:

rake refinery:override view=refinery/blog/posts/index

然后将第 19( <%= render :partial => "/refinery/content_page" %>) 行替换为:

<%= render :partial => "/refinery/content_page", :locals => { :remove_automatic_sections => true }  %>

您还可以将同一行替换为:

<%= render '/refinery/content_page', :hide_sections => :body_content_title %>

两种写同一件事的方法,但我想第二种更干净。

于 2012-10-05T03:08:05.263 回答