Stefan Kendall
Stefan Kendall

Reputation: 67802

Programmatically deploying portlets in locations through liferay?

I'd like to have a consistent layout every time I deploy my WAR, and currently, I need to manually move and add portlets to get the layout I need. Is there a way I can anagrammatically or through configuration setup liferay? Currently, the database isn't versioned, as I'm not sure there's a good way to do that.

Upvotes: 0

Views: 501

Answers (1)

justkt
justkt

Reputation: 14766

Yes, you can use a Layout, perhaps specified by a Layout Template. These layouts can be part of a Layout Set to create an entire portal.

To do this programmatically, you can follow the tutorial here. The class LayoutLocalServiceUtil is going to be key to the process.

Upvotes: 1

Related Questions