alloy:head

Head is a UIOutput that renders a <head> element for webapps, but not for portlets. In the case of portlets, the presence of alloy:head informs the JSF portlet bridge that JSF resources with target="head" should be included in the <head> element rendered by the portal.

Since it extends HtmlHead, it supports all the features of h:head. However, the main benefit of using alloy:head instead of h:head is that all of the Liferay Faces Alloy resources (such as alloy.js) are automatically included in the <head> element.

General Usage

The usage of alloy:head in webapps is the same as with portlets. However, the surrounding tag in a webapp is <html> whereas the surrounding tag in a portlet is f:view.

Source Code

Liferay Faces Alloy 4.1.1 + Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 4.0.0 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20