How to create a simple symlink page component


How is it possible to create a simple symlink component that lets users create symlinks to other existing pages?

Answer, Resolution

In order to build a simple symlink component that allows for creating a symlink page, a simple page component with following code is sufficient: mode =;
try {
    %><sling:include path="/content/geometrixx/en/products" /><%
} catch (Exception e) {
    log.error("Exception while including target", e);
} finally {

In above example, the content page located at /content/geometrixx/en/products will be displayed as a hard-coded reference. The symlink page itself is displayed in read-only mode, the edit functionality is disabled.

Please note that this is just an example showing the basic principle. What is missing for example is a dialog which allows users to choose the symlink target and so on.

Applies to