0
votes

I have created portlets for liferay and prepare couple of pages. Now I want to create installation script, which create pages definition in customer liferay server. I know that pages export/import is possible using LAR file, but this could be done only manualy, or using remote publishing which i am not able to do.

I was searching on net and found ddm tool. Which should be able to do that. Unfortunately i'm not able to get it work as it export only web content, blogs, wikis, etc, but not pages with portlets. It is probably because one of the condition is "Every Template must be assigned to a Structure. Don't create any templates on the Liferay server which does not have a structure connected to it. ". But how can I assign page to structure ? Cant find anything.

Or is there any other option for automatic page creation, which could be used ?

2

2 Answers

0
votes

In case you created a custom theme, you can easily use the "resources importer" to create an entire site via the "sitemap.json" file (define pages: choose layout, assign portlets to the columns, ...). You can also export existing content as xml from the current instance and import them via the theme. Same thing for web content structures and templates.

for more details: https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/importing-resources-with-your-themes

0
votes

Unfortunately theme is produced by another supplier, so this solution isn't suitable for me.

at the end i find working solution which consist of following steps:

  • create plugin hook
  • in hook setup upgrade process
  • in the upgrade process create pages with appropriate layout, friendlyUrl, etc. All these is possible to do using liferay api

Don't have enough reputation, so at least two links