This file contains 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
protected String retrieveHTMLContent(ThemeDisplay themeDisplay) throws SystemException, PortalException{ | |
String structureId="MY_STRUCTURE_ID"; | |
String templateId = "MY_TEMPLATE_ID"; | |
Company company = CompanyLocalServiceUtil.getCompanyByMx(PropsUtil.get(PropsKeys.COMPANY_DEFAULT_WEB_ID)); | |
long globalGroupId = company.getGroup().getGroupId(); | |
long groupId = themeDisplay.getLayout().getGroupId(); | |
JournalStructure rememberMe = JournalStructureLocalServiceUtil.getStructure(globalGroupId,structureId); | |
JournalArticle rememberMeContent = |
This file contains 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
protected String retrieveHTMLContent(ThemeDisplay themeDisplay) throws SystemException, PortalException{ | |
String structureId="MY_STRUCTURE_ID"; | |
String templateId = "MY_TEMPLATE_ID"; | |
Company company = CompanyLocalServiceUtil.getCompanyByMx(PropsUtil.get(PropsKeys.COMPANY_DEFAULT_WEB_ID)); | |
long globalGroupId = company.getGroup().getGroupId(); | |
long groupId = themeDisplay.getLayout().getGroupId(); | |
JournalStructure rememberMe = JournalStructureLocalServiceUtil.getStructure(globalGroupId,structureId); | |
JournalArticle rememberMeContent; |
This file contains 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
<% | |
List<String> popUpURLs = new ArrayList(); | |
for(String userId:userIds){ | |
User user = UserLocalServiceUtil.getUser(Long.valueOf(userId)); | |
%> | |
<portlet:renderURL var="viewUserPopUp" windowState="pop_up"> | |
<portlet:param name="userId" | |
value="<%=String.valueOf(user.getUserId())%>" /> |
This file contains 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
import com.liferay.portlet.journal.service.JournalStructureLocalServiceUtil; | |
import com.liferay.portlet.journal.model.JournalStructure; | |
List<JournalStructure> lista = JournalStructureLocalServiceUtil.getStructures(); | |
println(lista); | |
JournalStructure myStructure = JournalStructureLocalServiceUtil.getStructure(10903); | |
// hard coded id of the structure that you want, mine was 10903 | |
println(myStructure); | |
myStructure.setStructureId("MY_STRUCTURE_ID"); | |
println(myStructure); |
This file contains 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
<script type="text/javascript"> | |
AUI().ready(function(A) { | |
window.top.location.href = window.top.location; | |
}); | |
</script> |
This file contains 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
#set($dlFileEntryService = $serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService")) | |
#if (!$entries.isEmpty()) | |
<div id="$portletInstance" class="documents-links"> | |
#foreach ($entry in $entries) | |
#set($renderer = $entry.getAssetRenderer() ) | |
#set($className = $renderer.getClassName() ) | |
#if( $className == "com.liferay.portlet.documentlibrary.model.DLFileEntry" ) | |
#set($classPk = $entry.getClassPK()) | |
#set($fileEntry = $dlFileEntryService.getDLFileEntry($classPk)) |
This file contains 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
## Add this in portal_normal.vm to get a link to My Account | |
#set ($my_account_url = $theme_display.getURLMyAccount() + "&controlPanelCategory=my") | |
<a href="javascript:Liferay.Util.openWindow({dialog: {destroyOnHide: true}, title: 'My Account', uri: '$my_account_url'});"> |
This file contains 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
import org.codehaus.jackson.JsonNode; | |
import org.codehaus.jackson.map.ObjectMapper; | |
/** | |
* The readNodeValue method allows us to get a node value | |
* using the JSON Jackson library in Java. In this case | |
* we are interested in getting the value of a child node | |
* nested inside of a father node. | |
* | |
* The JSON input would be like this: |
OlderNewer