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
<#-- dump.ftl | |
-- | |
-- Generates tree representations of data model items. | |
-- | |
-- Usage: | |
-- <#import "dump.ftl" as dumper> | |
-- | |
-- <#assign foo = something.in["your"].data[0].model /> | |
-- | |
-- <@dumper.dump foo /> |
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.portal.model.Layout; | |
import com.liferay.portal.service.LayoutLocalServiceUtil; | |
import com.liferay.portal.service.ServiceContext; | |
Layout toDelete = LayoutLocalServiceUtil.getFriendlyURLLayout(10182, false, "/somepage"); | |
LayoutLocalServiceUtil.deleteLayout(toDelete, true, new ServiceContext()); |
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
<repositories> | |
<repository> | |
<id>lrce</id> | |
<url>https://repository.liferay.com/nexus/content/groups/liferay-ce/</url> | |
<releases> | |
<enabled>true</enabled> | |
</releases> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> |
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
<#-- Wrap the code inside the if clause of your "Enhanced List" ADT with this code --> | |
<@liferay_ui["tabs"] | |
names="list,chart" | |
refresh=false | |
type="pills" | |
value="chart" | |
> | |
<@liferay_ui["section"]> |
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
<div class="asset-abstract container-fluid"> | |
<div class="index span1" style="text-align:center"> | |
<h1>${curEntry_index +1}<h1> | |
</div> | |
<div class="asset-image span2"> | |
<img src="${assetRenderer.getThumbnailPath(renderRequest)}" /> | |
</div> | |
<div class="asset-content span7"> |
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
<#-- Copy this code to your "Enhanced List" ADT --> | |
<#assign aui = taglibLiferayHash["/WEB-INF/tld/aui.tld"] /> | |
<#assign liferay_portlet = taglibLiferayHash["/WEB-INF/tld/liferay-portlet.tld"] /> | |
<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> | |
<#if entries?has_content> | |
<#list entries as curEntry> | |
<#assign assetRenderer = curEntry.getAssetRenderer() /> |
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 code before the </#if> tag of your "Basic List" ADT --> | |
<#else> | |
${renderRequest.setAttribute("PORTLET_CONFIGURATOR_VISIBILITY", true)} |
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
<#-- Place this code at the top of your "Basic List" ADT --> | |
<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> | |
<#-- Copy this code below the asset abstract code of your "Basic List" ADT --> | |
<#if (enableRatings == "true")> | |
<div class="asset-ratings"> | |
<@liferay_ui["ratings"] | |
className=curEntry.getClassName() |
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
<#-- Replace the code inside the <#list></list> section of your "Basic List" ADT with this code --> | |
<#assign assetRenderer = curEntry.getAssetRenderer() /> | |
<#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /> | |
<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> | |
<#if assetLinkBehavior != "showFullContent"> | |
<#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> |
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 ($permissionThreadLocal = $portal.getClass().forName("com.liferay.portal.security.permission.PermissionThreadLocal")) | |
#set ($scopeGroupId = $getterUtil.getLong($request.theme-display.scope-group-id)) | |
#set ($userLocalService = $portalBeanLocator.locate("com.liferay.portal.service.UserLocalService.velocity")) | |
#set ($userId = $getterUtil.getLong($request.theme-display.user-id)) | |
#set ($portalURL = $httpUtil.getProtocol($request.attributes.CURRENT_COMPLETE_URL) + "://" + $getterUtil.getString($request.theme-display.portal-url)) | |
#set ($themeDisplay = $portal.getClass().forName("com.liferay.portal.theme.ThemeDisplay").newInstance()) |