Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Get Webcontent Elements for each page
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.
H 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)