简体   繁体   English

refinerycms 2.0.3,为页面指定样式表

[英]refinerycms 2.0.3, specify stylesheets for page

I would like to specify a css which applies only when I'm on a page.我想指定一个 css,它仅在我在页面上时适用。 I didn't find the solution.我没有找到解决方案。

Thank you for your help谢谢您的帮助

In config file pages.rb在配置文件 pages.rb
Make flag true for使标志为真

config.use_view_templates = true config.use_view_templates = true

It will provide you the option for select template for that page.它将为您提供该页面的 select 模板选项。
You can find it under admin pages tab -> Advanced Options.您可以在管理页面选项卡 -> 高级选项下找到它。
Also you need to add template name in pages.rb您还需要在 pages.rb 中添加模板名称

config.view_template_whitelist config.view_template_whitelist

Now you can add your styles on that page.现在您可以在该页面上添加您的 styles。
Hope it helps you.希望对你有帮助。

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

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