Last active
March 27, 2018 10:07
-
-
Save travisrcory/cddc939845294fdd9e1efbae93fbd5f6 to your computer and use it in GitHub Desktop.
Using Liferay Web Content structure type to import articles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <#if contents.getSiblings()?has_content> | |
| <#assign VOID = freeMarkerPortletPreferences.setValue("view", "basicContentView") /> | |
| <#list contents.getSiblings() as cur_contents> | |
| <#assign article = cur_contents.getData()?eval /> | |
| <#-- | |
| * This is a liferay-ui taglib that allows for rendering assets. | |
| * It is used throughout the portal, and here we can use it to display the articles we have nested | |
| * It accepts: | |
| * | |
| * className : the java className of the object model to be displayed (in our case it is JournalArticle) | |
| * classPK : the class primary key of the asset | |
| * template: the template to be used for rendering the article, by specifying "full_content" we are using that articles WCM template | |
| --> | |
| <@liferay_ui["asset-display"] | |
| className=article.className | |
| classPK=getterUtil.getLong(article.classPK, 0) | |
| template="full_content" | |
| /> | |
| </#list> | |
| <#assign VOID = freeMarkerPortletPreferences.reset() /> | |
| </#if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment