css not getting applied for velocity template in Liferay Theme

浪尽此生 提交于 2021-01-29 02:02:04

问题


I am using LIferay Theme to create a theme for a website. IN the portal_normal.vm file, I have included all the html code and css I have defined in custom.css

THe problem is that css from custom.css is not getting applied to portal_normal.vm page

SHould I include some file in velocity file which tells that custom.css should be included?

Also is it ok to include all css code in velocity?

Regards

EDIT:

custom.css and portal_normal.vm are inside _diffs folder


回答1:


put the custom.css under ~/theme/docroot/_diffs/css/custom.css

see the main.css in ~/theme/docroot/css/main.css it should include

...
@import url(custom.css);
...



回答2:


It should work may be problem in browser cache.. try to run ant clean and then run ant deploy.

and also try to copy portal_normal.vm file to _diff/templates directory.

_diff/templates/portal_noraml.vm and change here.



来源:https://stackoverflow.com/questions/23052736/css-not-getting-applied-for-velocity-template-in-liferay-theme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!