Skip to content

Instantly share code, notes, and snippets.

@mrop
mrop / pictureTag
Created November 14, 2014 15:04
html picture tag with Hippo
<hst:link hippobean="${imageset.large}" var="large"/>
<hst:link hippobean="${imageset.medium}" var="medium"/>
<hst:link hippobean="${imageset.small}" var="small"/>/>
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source srcset="${large}" media="(min-width: 912px)">
<source srcset="${medium}" media="(min-width: 640px)">
<source srcset="${small}" media="(min-width: 0px)">
<!--[if IE 9]></video><![endif]-->
</picture>
$.namespace('Hippo.ChannelManager.TemplateComposer.IFrame.PageHostMessageHandler');
Hippo.ChannelManager.TemplateComposer.IFrame.PageHostMessageHandler.prebuildoverlay = function(){
ResponsiveGrid.prototype.initGridUnits();
};
@mrop
mrop / gist:6cbd000781178be8975d
Created September 12, 2014 11:17
error in opening zip file
find . -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid | sed 's|[^(]*(\([^)]*\)).*|\1|' | xargs rm -v
@mrop
mrop / gist:d125aa2b2610a3d09781
Last active August 29, 2015 14:06
org.onehippo.cms7.essentials.components.CommonComponent#setContentBean
/**
* Sets content bean onto request. If no bean is found, *no* 404 response will be set.
* NOTE: we first check if document is set through component interface,
* otherwise we try o fetch mapped (sitemap) bean
*
* @param documentPath
* @param request HstRequest
* @param response HstResponse
* @see #pageNotFound(org.hippoecm.hst.core.component.HstResponse)
*/