简体   繁体   English

RefineryCMS - 删除默认页面部分

[英]RefineryCMS - remove default page parts

I want to remove the side_body section on each page in RefineryCMS. 我想删除RefineryCMS中每个页面上的side_body部分。

The guide advises that you can change page parts by going into config/initializers/refinery/pages.rb and altering the settings: 该指南建议您可以通过进入config/initializers/refinery/pages.rb并更改设置来更改页面部分

So I have changed: 所以我改变了:

config.default_parts = [“Body”, “Side Body”]

to: 至:

config.default_parts = [“Body”]

I have restarted my server, but my side_body section still appears. 我已经重新启动了我的服务器,但我的side_body部分仍然出现。 Can the side_body be removed? 可以移除side_body吗?

It is just a guess, but I believe that it only appears on already existing pages. 这只是一个猜测,但我相信它只出现在现有页面上。 If you create a new page, you should only see the Body -tag. 如果您创建新页面,则只能看到Body -tag。 At least this was the behavior in Refinery 1.0.8. 至少这是Refinery 1.0.8中的行为。

To remove the Side Body from already existing pages, you will have to make the pageparts editable. 要从现有页面中删除Side Body ,您必须使pageparts可编辑。 I think you can achieve this by setting config.new_page_parts => true . 我想你可以通过设置config.new_page_parts => true来实现这一点。 After that, when you edit the page, you should be able to see a (+), a (-) and a (reorder)-sign right above the editor. 之后,当您编辑页面时,您应该能够在编辑器上方看到(+),a( - )和(重新排序)-sign。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM