Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Carlos Adolfo Ortiz Quirós
Including custom Javascript and CSS in a portlet
June 5, 2012 6:04 AM
Answer

Carlos Adolfo Ortiz Quirós

Rank: Junior Member

Posts: 40

Join Date: May 22, 2010

Recent Posts

Hi mates

I want to write a portlet that will use a jQuery plugin and it will use a custom CSS as well. Let's assume that in my theme I have referenced for the whole site the jQuery library.
That is, it will use a jQuery Plugin tied with a custom CSS for each view, but my question arises here as how to do it the best way possible because if I include the same portlet in one page, then I think two jQuery plugin files and two CSS files are included as well.

Should there be a way to make Liferay Portal to just grab one copy for both portlets for its own jQuery plugin and Custom CSS referenced?
Sorry if write this thread but I am newbie to Liferay Portal development and I would like your help, any help and guidance you can give me, and perhaps there exists a wiki page on this subject, I guess.