Message Boards
Get Webcontent Elements for each page
H Seemann, modified 3 Years ago.
Get Webcontent Elements for each page
New Member Posts: 8 Join Date: 2/10/20 Recent Posts
Hello Guys,we want to programmatically get every webcontent on each site. I know that we can get a specific article with the "JournalArticleLocalServiceUtil.getLatestArticle()"
But i know how to get the internal connection between a page and all of its journalArticles.Thanks in advance.
But i know how to get the internal connection between a page and all of its journalArticles.Thanks in advance.
Olaf Kock, modified 3 Years ago.
RE: Get Webcontent Elements for each page
Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent PostsH Seemann:
There's a multitude of possible connections: Could be WebContentDisplay portlets with static configurations of an article. It could be an AssetPublisher that happens to show a certain article today, for a certain user. Potentially others - you're not looking for an easy problem.
But i know how to get the internal connection between a page and all of its journalArticles.Thanks in advance.
The API-name for a page is "Layout", if you start with LayoutLocalService or LayoutService, from there you'll find the portlets on the page (typeSettings) and will need to inspect the ones you can decipher (e.g. read their portletPreferences)