Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Scott Hanson
Suggestions on how to install YUI carousel on a homepage? Put in Portlet?
October 26, 2012 1:46 PM
Answer

Scott Hanson

Rank: New Member

Posts: 12

Join Date: September 5, 2012

Recent Posts

So I am working with a customized version of the ZOE Healthcare template. I have the top portion and navigation styled for our organization and now have a custom page layout (thanks to help here).

We need one of those carousel-image scroller things to cycle a banner on the home page. The layout I'm hoping for is:

Row: 100% (logos and navigation) - done
Row: 100% (for cycling banner)
Row: 65%/35% Text Content / Links
Row: 100% (footer/footer links and copyright) - done

It looks like other than applications, the only drag-and-drop portlet available is "Web Content Display". I have the YUI carousel designed/styled and ready to go--what's the best way to get this in the second 100% area I've created in my layout? Am I supposed to design some sort of custom portlet to handle this? I don't want to put on every page (where I'd then code it straight into the portlet_normal.vm file).

Suggestions appreciated! How individual areas of pages and portlets are styled is still confusing to me at the moment.
Anonymous
RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl
October 26, 2012 1:53 PM
Answer

Anonymous

You can create a page template that places the web content display in the top column of the layout that has the carousel. Then apply that page template to each page you want it on.
Gaurav Jain
RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl
October 26, 2012 2:07 PM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 141

Join Date: January 31, 2011

Recent Posts

Yes, you can use WebContentDisplay (WCD) portlet for your carousel. Infact this is best suitable IMO.
Create a structure/template and then you can put your velocity/html/js code in this template. In your layout, add a WCD portlet, add a content into it using this structure/template and you are done.

For styling individual portlets; general liferay standard is to create a theme and make the css there for individual portlets or layouts etc.
Otherwise liferay also provide look and feel option per portlet where you will have a place to add css to this particular portlet instance (but is not recommended as it will be a redundant and complex and not usable way; this is preferable when you need to add small and specific css to any portlet instance)
Scott Hanson
RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl
October 29, 2012 10:39 AM
Answer

Scott Hanson

Rank: New Member

Posts: 12

Join Date: September 5, 2012

Recent Posts

Putting my YUI code in script tags in the portlet, the CSS in custom.css, and the HTML in the portlet works--but what's the best way to remove the (automatic) Portlet title that comes in for this component? I could code a display: none on the ID of the h1--but it seems like that might not be a great way to go about it if I want to export this later.

Is this where somehow defining a custom "structure" or template comes in?

Also things got pretty hosed when I tried putting the YUI code in main.js--in any of the pre-provided areas.

Appreciate greatly the help here I must say.
Scott Hanson
RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl
October 29, 2012 10:38 AM
Answer

Scott Hanson

Rank: New Member

Posts: 12

Join Date: September 5, 2012

Recent Posts

Bradley Wood:
You can create a page template that places the web content display in the top column of the layout that has the carousel. Then apply that page template to each page you want it on.


How does that work? What's the process for creating a template for a portlet?

Have searched around and come up empty but will keep trying. Thanks again!