×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Create links

Thomas Walker

Thomas Walker Last update: Oct 17, 2017

Linking to other pages

You can create links to other pages using the $link placeholder:

Linking to a page

<a href="$link.page("pageTitle")">Link_to_page</a>

You can also link to a page in a specific space:

Linking to a page in another space

<a href="$link.page("spaceKey", "pageTitle")">Link_to_page_in_other_space</a>

During rendering, Scroll Viewport replaces the placeholder with a generated link. For more information, see the complete reference of the $link placeholder.

Retrieving content from other pages

Sometimes you have to fetch some information from other pages, such as children or the next or previous page.

Other page objects

This will retrieve a page with all the methods and properties a usual PagePlaceholder has.

#set($otherPage = $include.page("Other Page"))

You can also add the space to this function in the same way as with the $link placeholder.

Related page objects

You can also retrieve a page's children pages, parent page and next and previous pages.

Chapter navigation

#if( $page.next )
    <a href="$page.next.absoluteLink">$page.next.title</a> 
#end
#if( $page.prev )
    <a href="$page.prev.absoluteLink">$page.prev.title</a>
#end

If you want to retrieve only pages at the same level, you can use the following snippet:

#if ($page.parent.children.contains($page.prev) && $page.prev) 
	<a href="$page.prev.absoluteLink">$page.prev.title</a> 
#end

More resources

The Add breadcrumbs uses $page.ancestors. More information can be found in the PagePlaceholder docs.

2x2.11
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok