I need to create a portlet in order to change the default category behaviour/interface in Liferay 7.
My objective is to duplicate assetcategory table, expand and change its columns, and use this new table as a reference for categories within Liferay backend.
Therefore there are three key points my portlet has to update:
- The category organization UI to create/update category tables on DB. I’m able to create a new Liferay module project (panel-app template) which can present the UI backend interface from the side menu and interact with the DB.
- Override default category selection panel within web content properties panel (metadata > category select). I can create a new Liferay module project fragment to override the com.liferay.asset.categories.selector.web, however I’ve noticed I can select only one file path (eg. META-INF/resources/view.jsp)
- Override default asset publisher filter behaviour in order to allow my custom categories selection. I’ve not yet investigated this point.
I’m currently stuck at point 2 because after creating a new Liferay module project fragment, set the target Host OSGI Bundle to com.liferay.asset.categories.selector.web (which I believe is the correct one, please correct me if it isn't) and selecting the overridden files as META-INF/resources/view.jsp, I can’t proceed to redraw the category selection interface.
Here my attempts:
- Updating the code view.jsp (eg. adding some text string) I can correctly see them in the portlet.
- Removing/commenting all the code in view.jsp an error is shown: Asset category selector is temporarily unavailable
- Selecting all three files available to be overridden in the main portlet wizard (META-INF/resources/view.jsp, init.jsp and init-ext.jsp) and updating view.jsp (like the first example) nothing happen in the portlet
Some screenshot below: