简体   繁体   English

如何在RefineryCMS中覆盖自定义扩展的布局?

[英]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.

相关问题 如何覆盖RefineryCMS管理区域“图像”选项卡的视图? - How do i override the views of the “Images” tab of RefineryCMS' admin area? 我如何使用refinerycms中的嵌套模型属性? - How do i work with nested model attributes in refinerycms? 我如何生成新的finerycms rails应用程序? - how do i generate new refinerycms rails app? 为什么我在productine模式下部署精炼厂时发现错误 - Why do I catch and error in producton mode deploying refinerycms 如何在MacRuby中覆盖initWithContentRect? - How do I override initWithContentRect in MacRuby? Rails - 如何在我的自定义布局中使用 application.html.erb? - Rails - How do I use application.html.erb in my custom layout? 我如何才能得到finerycms以显示来自Amazon S3与/ system / images…的上传图像URL? - How can I get refinerycms to display uploaded image urls from Amazon S3 versus /system/images…? 如何有条件地禁用Ramaze布局? - How do I conditionally disable Ramaze layout? 如何覆盖Rails中的rake任务的数据库连接信息? - How do I override database connection info for a rake task in rails? 如何用Chocolatey覆盖Ruby和Ruby DevKit installdir? - How do I override the Ruby and Ruby DevKit installdir with Chocolatey?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM