Foren

Suggestions on how to install YUI carousel on a homepage? Put in Portlet?

Scott Hanson, geändert vor 11 Jahren.

Suggestions on how to install YUI carousel on a homepage? Put in Portlet?

New Member Beiträge: 12 Beitrittsdatum: 05.09.12 Neueste Beiträge
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.
Bradley Wood, geändert vor 11 Jahren.

RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl (Antwort)

Scott Hanson, geändert vor 11 Jahren.

RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl

New Member Beiträge: 12 Beitrittsdatum: 05.09.12 Neueste Beiträge
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!
thumbnail
Gaurav Jain, geändert vor 11 Jahren.

RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl (Antwort)

Regular Member Beiträge: 145 Beitrittsdatum: 31.01.11 Neueste Beiträge
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, geändert vor 11 Jahren.

RE: Suggestions on how to install YUI carousel on a homepage? Put in Portl

New Member Beiträge: 12 Beitrittsdatum: 05.09.12 Neueste Beiträge
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.