Skip to content

Instantly share code, notes, and snippets.

View baxtheman's full-sized avatar

Daniele Baggio baxtheman

View GitHub Profile
@baxtheman
baxtheman / adt.ftl
Created August 19, 2019 12:17
Liferay 7, asset publisher ADT, list preferences and variables context
<div>
<pre>
<#list portletPreferences?keys as preference>
<#if portletPreferences[preference] ??>
<#assign mapValues = portletPreferences[preference] />
<#list mapValues as value >
${preference} = ${value}<br />
</#list>
</#if>
</#list>
@baxtheman
baxtheman / portlet.properties.md
Created October 4, 2019 13:30
Read value from properties file in liferay 7

You need to add your portlet.properties under resource folder.

portlet.properties
custom.liferay.base.url = "https://www.liferay.com/"

To read it in your java class

You need to import

var ua = navigator.userAgent,
clickEvent = (ua.match(/iPad/i) || ua.match(/iPhone/i)) ? "touchstart" : "click";
//28-11-2018 Aggiunta controllo posizione aiutaci a migliorare la pagina
// ###
var HM_nuovoHeader = false;
$(document).ready(function () {
if (window.location !== window.parent.location) {
$("#header-navbar").addClass("hidden");
@baxtheman
baxtheman / gist:50ddf73438edb2d7aa8f758beed34da7
Last active September 4, 2023 09:50
Liferay, apache RewriteRule to remove maximized from login page
## using ProxyPass, when p_p_id=com_liferay_login_web_portlet_LoginPortlet , then remove p_p_state=maximized
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)&?p_p_id=com_liferay_login_web_portlet_LoginPortlet&?(.*)$
RewriteCond %{QUERY_STRING} ^(.*)&?p_p_state=[^&]+&?(.*)$
RewriteRule ^/?(.*)$ /$1?%1%2 [L,PT]