×

You're using an outdated browser

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

Manual

"Share the page" in a Viewport

Roman Serazhiev

Roman Serazhiev Last update: Jun 4, 2019

Note

tiny URL is not accessible; this code outputs the viewport URL.

  1. Add the following to the theme's HTML <head> (parts of it might already be in the theme):

    <meta name="ajs-page-id" content="$page.id">
    <meta name="ajs-content-id" content="$page.id">
    <link rel="shortlink" href="$page.absoluteLink">
    #if ($page.type == 'page')
    <meta name="ajs-content-type" content="page">
    #elseif ($page.type == 'blog')
    <meta name="ajs-content-type" content="blog">
    #end
    
    $page.resources.require('com.atlassian.confluence.plugins.share-page:view-resources')
  2. Add the following to wherever you want it to appear in your page:

    <a id="shareContentLink" href="#" class="aui-button aui-button-subtle share">
    <span>
    <span class="aui-icon aui-icon-small aui-iconfont-share"></span>
    <u>S</u>hare
    </span>
    </a>


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