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
| ## example expando with json | |
| #if ($request.lifecycle == "RENDER_PHASE") | |
| <p><em>Expando Demo 2: Creating and Reading Expando Data from AJAXified WCM Portlet Resource</em></p> | |
| <div id="dataTable"></div> | |
| <body onload="getExpando()"> | |
| <script type="text/javascript"> | |
| function getExpando() { |
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
| ## | |
| ## Expando Browser/Editor via Liferay WCM | |
| ## | |
| #set ($pns = $request.portlet-namespace) | |
| #set ($scopeGroupId = $getterUtil.getLong(${request.theme-display.scope-group-id})) | |
| #if ($request.lifecycle == "RENDER_PHASE") | |
| <body onload="${pns}getClassNames();"> | |
| <article> |
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
| ## AJAXification with well-formed JSON result construction | |
| ## AJAXification with AUI and JSON parameters | |
| #set ($pns = $request.portlet-namespace) | |
| <body> | |
| <link href="//code.google.com/apis/maps/documentation/javascript/examples/standard.css" rel="stylesheet" type="text/css" /> | |
| <script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script> | |
| <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/md5.js"></script> |
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
| #!/bin/sh | |
| mkdir -p TEMPLATES | |
| cd TEMPLATES | |
| echo 'mget *' | /opt/local/bin/cadaver http://localhost:8080/webdav/guest/journal/Templates | |
| for i in * ; do | |
| [ `echo $i | egrep ^[0-9]+$` ] && | |
| mv $i $i.vm | |
| done |
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
| #!/bin/sh | |
| SRCFILE="$1" | |
| cd TEMPLATES | |
| for i in *.vm ; do | |
| NN=`echo $i|sed 's/\.vm//'` | |
| echo "put $SRCFILE $NN" | /opt/local/bin/cadaver http://localhost:8080/webdav/wcm-apps/journal/Templates | |
| done |
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
| <#-- 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 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 ($portalBeanLocator = $portal.getClass().forName("com.liferay.portal.kernel.bean.PortalBeanLocatorUtil")) | |
| #set ($teamLocalService = $portalBeanLocator.locate("com.liferay.portal.service.TeamLocalService.velocity")) | |
| #set ($userLocalService = $portalBeanLocator.locate("com.liferay.portal.service.UserLocalService.velocity")) | |
| #set ($userId = $getterUtil.getLong($request.theme-display.user-id)) | |
| #set ($user = $userLocalService.fetchUserById($userId)) | |
| ## teams | |
| <p> |
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 ($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()) |
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
| <#-- 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 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
| <#-- 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() |