Reputation: 51239
The ROOT
application contains all of the items described (classic theme, approx 10 layouts and numerous portlets).
Is it possible or good practice to create own packages like this? How to?
Please, give a hint.
Upvotes: 2
Views: 796
Reputation: 11698
Theoretically it is possible to have a single project with a Portlet, Theme, Layout and a Hook all packed in one.
But it is not at all a good-practice to have all the four types togather, from both maintenance and development perspective.
Though sometimes you may have a portlet and hook in one project if they are somehow related for example like you want to have some Listeners to add data to your custom table and then your portlet would provide an interface to update or view that data, so in this case they are interdependent and if the portlet goes the hook is of no use. So go ahead and combine them.
So if the 4 types are related somehow or interdependent than I see a usecase to have them togather (it would be rare) but still from maintenance point of view I would rather keep the 4 separate. Atleast I would keep portlets and themes separate and may have a Portlet-hook combination and a theme-layout combination since they go well with each other even from the maintenance & development point-of-view.
Here is how you can do it
MyCompletePackage-portlet
portlets
folder of the plugins-sdk
if you are using the plugins-sdk
.liferay-hook.xml
for hooksliferay-portlet.xml
for portletsliferay-look-and-feel.xml
for themesliferay-layout-templates.xml
for layoutsbuild.xml
file and just build as you normally do.build.xml
.build.xml
.Let me know if this works for you or if you face any issues.
Disclaimer: I have not tried the 6th point but it should work
Upvotes: 2
Reputation: 1798
Generally one would add all portlets in one war so that they can access the service without any problems and to save context reloading time.
However Themes with portlets might not be a good idea always since we change theme.. and thus while updating portlets reloading in unnecessary. Well that's once in months but still a statement to keep portlets away from themes war.
Upvotes: 1