Fórumok

CSS in Liferay

thumbnail
Roman Hoyenko, módosítva 12 év-val korábban

CSS in Liferay

Liferay Master Bejegyzések: 878 Csatlakozás dátuma: 2007.10.08. Legújabb bejegyzések
Is there a way to have a separate CSS defined per page or per community in Liferay?

I want users to be able to define some of their own css without using Advanced Styles of the portlet - using Advanced Styles makes the management of CSS files pretty complex, if something changes we need to update several places.
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Page and community information is stored in the database so I think you'll have to use Advanced Style.

The other option, which is not very desirable, is to hard code css into the template with a selection criteria
for page and community.
thumbnail
Samuel Kong, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Legend Bejegyzések: 1902 Csatlakozás dátuma: 2008.03.10. Legújabb bejegyzések
1. Dockbar > Manage > Page
2. Find the "Look and Feel" (there's two. One for the whole community and one for just the current page)
3. Look and Feel > Regular Browsers > CSS

This is similar to the Advance Style of the portlet, but the CSS is attached to the community/page instead of a portlet.
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Thanks Samuel, didn't know about that feature. Seems I still have more things to learn about Liferay.emoticon
thumbnail
Roman Hoyenko, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Master Bejegyzések: 878 Csatlakozás dátuma: 2007.10.08. Legújabb bejegyzések
Thanks, that would help us a lot!
thumbnail
Roman Hoyenko, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Master Bejegyzések: 878 Csatlakozás dátuma: 2007.10.08. Legújabb bejegyzések
Ok, I tried it and it looks like when I have more or less complex rules like

.link-box ul li {
vertical-align:top;
}

it says:

You have entered invalid data. Please try again. Can we avoid the check? Looks like this is a bug.
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
I was able to save it without any problem on 6.0.6 Tomcat bundle.

Mellékletek:

thumbnail
Roman Hoyenko, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Master Bejegyzések: 878 Csatlakozás dátuma: 2007.10.08. Legújabb bejegyzések
may be it's the size of the css, I'll check and post my findings
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
I think it was LONGVARCHAR. So the max size is around 32K.
thumbnail
Roman Hoyenko, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Master Bejegyzések: 878 Csatlakozás dátuma: 2007.10.08. Legújabb bejegyzések
Do you know the table it is stored in? May be I can change it to CLOB so the size is not limited.

But I don't think our CSS was even 32k, most likely it's 4000 bytes varchar2. I looked at the Layout table, it has CSS column and it's 4000 bytes, which I think is clearly not enough.

I'll try changing to clob and see if this works.

P.S. Looks like Layout is the table for individual pages and LayoutSet is for the community. They all have 4k limit (at least in Oracle). If the pages are more or less complex 4k is not nearly enough.
thumbnail
Roman Hoyenko, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Master Bejegyzések: 878 Csatlakozás dátuma: 2007.10.08. Legújabb bejegyzések
Ok, changing the table from Varchar(4000) to CLOB worked, I can save longer CSS
thumbnail
Hitoshi Ozawa, módosítva 12 év-val korábban

RE: CSS in Liferay

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Wow! Thank you for sharing the information. I'll remember it. emoticon
thumbnail
Samuel Kong, módosítva 12 év-val korábban

Thread Split

Liferay Legend Bejegyzések: 1902 Csatlakozás dátuma: 2008.03.10. Legújabb bejegyzések
Message is slightly off topic, so I'm creating a new thread. The new thread can be found at http://www.liferay.com/community/forums/-/message_boards/view_message/12211457.
thumbnail
Milen Dyankov, módosítva 12 év-val korábban

RE: CSS in Liferay

Regular Member Bejegyzések: 171 Csatlakozás dátuma: 2009.09.23. Legújabb bejegyzések
For community scoped CSS which are themes independent, you may find Custom Global Markup portlet useful. Here is some more info about it: http://milen.commsen.com/2010/04/custom-global-markup-portlet.html