Foren

How can i add my css to theme

ruaru d, geändert vor 10 Jahren.

How can i add my css to theme

New Member Beiträge: 7 Beitrittsdatum: 08.04.14 Neueste Beiträge
I have deploy a theme.........I have css files which i want to add to my theme, but don't know how to make changes and where to make changes so that i can make theme view as my own css,......


i m using liferay v6.2.......I don't know use of all ".vm " files in templates..........I don't know how to add css classes and where to add........
thumbnail
Manali Lalaji, geändert vor 10 Jahren.

RE: How can i add my css to theme

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
Hi Ruaru,

In order to create custom styles, create a folder named css inside your _diffs folder of theme and place a single file there called custom.css.
This is where you’ll define all your new styles. As the custom.css is loaded last, styles defined here override any styles in the parent theme.
It’s considered as a best practice to add your styles only to the custom.css file.

HTH!
ruaru d, geändert vor 10 Jahren.

RE: How can i add my css to theme

New Member Beiträge: 7 Beitrittsdatum: 08.04.14 Neueste Beiträge
Thank u,
Manali

I have added css as u told...........
But now i have html pages and i want to add these pages to my theme....how can i add..........Should i make jsp pages or not?......
thumbnail
Manali Lalaji, geändert vor 10 Jahren.

RE: How can i add my css to theme

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
Hi Ruaru,

If you have static pages, you can opt for Web Content Display portlet.
You can create webcontent for them and display using webcontent display portlet.

In theme, we have portal_normal.vm. The change done over here, affects all pages in portal.

If you have portlets added on your page, their html code should go in respective jsps.

HTH!
ruaru d, geändert vor 10 Jahren.

RE: How can i add my css to theme

New Member Beiträge: 7 Beitrittsdatum: 08.04.14 Neueste Beiträge
I have one page "home.html", and i have copied the html code from "home.html" and paste it in portal_normal.vm....but now how can i make another pages..........

If i want give link to go from one page to another what should i do...........where should i change.........
and what can i do with all ".vm" .i don't know use of these "".vm"files.........
thumbnail
Manali Lalaji, geändert vor 10 Jahren.

RE: How can i add my css to theme

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
Hi Ruaru,

You should not write code in portal_normal.vm if it is page specific. Only code like header, footer which is common across portal should be written in vm file.
In your case, it seems you want to create html pages and link them.

You should create webcontent and required structure and template to display them.

You can refer to links:
link1 , link2 ,link3


HTH !!
ruaru d, geändert vor 10 Jahren.

RE: How can i add my css to theme

New Member Beiträge: 7 Beitrittsdatum: 08.04.14 Neueste Beiträge
So now for html pages and to give link i have to create web content ,structure and templates..............And do not I need to change in "portal_normal.vm" file.? Or any other ".vm" files?

I have "custom.css" ,but how can i use my css classes? Where do i use this class? so that i can make changes......
thumbnail
Manali Lalaji, geändert vor 10 Jahren.

RE: How can i add my css to theme

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
Hi Ruaru,

Good to know things are working for you!! No need for any changes in portal_normal.vm file. Its meant for changes required on whole portal.

If you have added your css in custom.css file placed under diffs folder of theme, it shall be reflected on portal. Just deploy theme and check.

HTH!!
ruaru d, geändert vor 10 Jahren.

RE: How can i add my css to theme

New Member Beiträge: 7 Beitrittsdatum: 08.04.14 Neueste Beiträge
Thank You ,
Manaliemoticon
balaji kute, geändert vor 8 Jahren.

How to apply custom css on portal_normal.vm ??

New Member Beitrag: 1 Beitrittsdatum: 10.02.16 Neueste Beiträge
i have created theme for login and landing page with inline css .. but how can i apply external css on it.
abhishek kumar, geändert vor 8 Jahren.

RE: How to apply custom css on portal_normal.vm ??

Regular Member Beiträge: 138 Beitrittsdatum: 17.08.15 Neueste Beiträge
Abdur rasheed, geändert vor 8 Jahren.

RE: How to apply custom css on portal_normal.vm ??

Junior Member Beiträge: 71 Beitrittsdatum: 26.09.08 Neueste Beiträge
Hi,
You can add css in custom.css file ,then check your main.css , custom.css imported at last, deploy your theme. It will reflect.

You have to put your custom.css in diffs folder under css folder.
Thanks
Rasheed