[英]How do I override the layout for a custom extension in RefineryCMS?
I generated an extension for RefineryCMS, following the instructions in the Refinery Guide for 'Generate an Extension to Use Your MVCs'. 我按照《精炼指南》中“生成使用MVC的扩展”中的说明生成了RefineryCMS的扩展。 I now need to alter the layout, but where is it? 我现在需要更改布局,但是它在哪里? I cannot find any documentation that will tell me where I might overwrite it from. 我找不到任何可以告诉我从哪里覆盖它的文档。
Maybe it's a bit late. 也许有点晚了。
If I well undestood your issue, I will advise you to add your custom layout
inside app/views/layout/my_custom_layout.html.erb
. 如果我能很好地解决您的问题,建议您在app/views/layout/my_custom_layout.html.erb
添加自定义layout
。
Then I render it as follow in your extension view: 然后在您的扩展视图中按如下所示进行渲染:
<%= render '/layout/my_custom_layout' %>
Hope It will help someone. 希望它会帮助某人。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.