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
<#assign image_info = jsonFactoryUtil.looseSerializeDeep(Image)?eval > | |
<code>${(image_info.attributes.alt)!}</code> | |
<#assign fileEntryId = (image_info.attributes.fileEntryId?number)! > | |
<#if fileEntryId?has_content > | |
<#assign fileEntry = _dlfels.getFileEntry(fileEntryId)> | |
<#assign file_entry_info = jsonFactoryUtil.looseSerializeDeep(fileEntry) > | |
<code>${file_entry_info}</code> | |
</#if> |
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
plugins { | |
id 'java' | |
id "com.liferay.js.transpiler" version "2.4.60" | |
} | |
group 'org.example' | |
version '1.0-SNAPSHOT' | |
repositories { | |
maven { |
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
protected static String addParameterWithPortletNamespace( | |
String url, String name, String value) { | |
String portletId = HttpUtil.getParameter(url, "p_p_id", false); | |
if (Validator.isNotNull(portletId)) { | |
name = PortalUtil.getPortletNamespace(portletId) + name; | |
} | |
return HttpUtil.addParameter(url, name, value); | |
} |
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
String languageId = LocaleUtil.toLanguageId(locale); |
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
$themeDisplay.getPortletDisplay().getTitle() |
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
import com.liferay.portal.util.*; | |
import com.liferay.portal.model.*; | |
import com.liferay.portal.service.*; | |
import com.liferay.portlet.journal.*; | |
try { | |
company = PortalUtil.getCompany(actionRequest) | |
companyId = company.getCompanyId() |
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
function popUpUrl(id) { | |
var url = Liferay.PortletURL.createRenderURL(); | |
url.setPortletId("56"); // "Web Content Display" portlet ID | |
url.setWindowState('pop_up'); | |
url.setPortletMode('view'); | |
url.setParameter("groupId", Liferay.ThemeDisplay.getScopeGroupIdOrLiveGroupId()); | |
url.setParameter("articleId", id); // webcontent ID | |
return url; | |
}; |
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
private void downloadFile(ResourceRequest resourceRequest, ResourceResponse resourceResponse, String siteName) { | |
try { | |
File file = new File("${filePath}"); | |
InputStream in = new FileInputStream(file); | |
HttpServletResponse httpRes = PortalUtil.getHttpServletResponse(resourceResponse); | |
HttpServletRequest httpReq = PortalUtil.getHttpServletRequest(resourceRequest); | |
ServletResponseUtil.sendFile(httpReq, httpRes, file.getName(), in, "application/download"); | |
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
<aui:script> | |
function <portlet:namespace />filterCalendarBookings(calendarBooking) { | |
return <%= calendarBookingId %> !== calendarBooking.calendarBookingId; | |
} | |
function <portlet:namespace />getSuggestionsContent() { | |
return document.<portlet:namespace />fm.<portlet:namespace />title.value + ' ' + window.<portlet:namespace />description.getHTML(); | |
} | |
function <portlet:namespace />resolver(data) { |
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
#set ($AssetEntryLocalService = $serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService")) | |
#set ($journalArticleLocalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")) | |
#set( $structureId = $journalArticle.getStructureId() ) | |
#set ($ddmStructureLocalService = $serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") ) | |
#set( $numNews = $journalArticleLocalService.getStructureArticles($groupId, $structureId) ) | |
#set( $newsUrl = $layout.getFriendlyURL() ) | |
#set( $newsArticles = $journalArticleLocalService.getStructureArticles($groupId, $structureId) ) | |
#set( $checkedArticleIds = [] ) |
NewerOlder