Access Keys:
Skip to content (Access Key - 0)

incoming-links macro

Overview

The {incoming-links} macro displays a customisable list of incoming links for the current page...

There are many occasions when it's useful to know what other pages link to the current page as they will almost always be related to the current page and therefore be of some use to the person viewing the page.

This macro allows you to add a customisable list of incoming pages that can also be filtered to specific Spaces and content types, etc.

Usage

The macro has the following parameters:

{incoming-links:mode=[list,flat]|separator=[brackets,braces,parens,pipe]|parent=[Parent Page]
|ancestor=[Ancestor Page]} No links available {incoming-links}

Parameters

Parameter Required Default Notes
mode list The type of output, either:
  • list (default) - a bullet list of incoming links
  • flat - a flattened (single line) list of incoming links
style icons The style of bullet point to use for each item when using the list type:
  • none – no marker
  • icons – the default style showing icons to depict content type
  • Any valid CSS style (see the Styles tab above)
separator brackets When using the flat mode, this parameter defines how individual items will be separated from one another:
  • brackets (default) – items will be enclosed in \square \brackets
  • braces – items will be enclosed in {curly} {braces}
  • parens – items will be enclosed in (normal) (brackets)
  • pipe – items will be separated | by | pipes
  • Anything else – a custom separator
spaces   By default, incoming links from any space that the user has access to will be listed. You can use this parameter to filter the links to one or more spaces (if using more than one space, separate the space keys with commas).
types All Types By default, all content types that link to the current page will be listed. You can however specify a comma separated list of specific comment types to include. The available content types are:
  • page – pages
  • blogpost – news articles (blog posts)
  • comment – comments (does not appear to work due to a bug in Confluence)
  • spacedescription – the description for a space
  • userinfo – user profile
  • mail – mail archive message
parent Any If you want to restrict the list of incoming links to a page with a specific parent page, use this parameter.
ancestor Any If you want to restrict the list of incoming links to a page with a specific ancestor page (ie. a page further up the site hierarchy), use this parameter to specify the ancestor page.
excerpt false Set to true to display excerpts for the incoming link (create excerpts using the excerpt macro).
sort natural Specify the sort order of the displayed links:
  • natural (default) – A natural sort on the title (eg. 1, 2, 3, .. 10, etc)
  • bitwise – A bitwise sort on the title (eg. 1, 10, 2, 3, ... etc)
  • creation – Sorted by creation date of the content
  • modified – Sorted by the date the content was last modified
first   Limit the list of incoming links to the first x links, eg. first=5 will only show a maximum of 5 links
reverse false If set to true, the sort order of the incoming links will be reversed.

Styles

Depending on your web browser and installed unicode sypport, you may get varying results with the style parameter. Click the following links for more information:

Styles in your browser

Correct styles

Examples of style faults

Examples

Basic Use - List all Incoming Links

Limiting Number of Links

Styles and Indents

Output Mode

Customising the Flat Style

Filtering Content Types

Alternate Sort Methods

Reverse Sort Order

Filtering Links based on Parent, Ancestor and Space

Excerpts

Hints and Tips

This macro is useful in navigation panels as it can show a list of highly relevant related content to the page being viewed, filtered if necessary to a specific part of your site.

Frequently Asked Questions

Q How do you get those four dots as the custom separator?
A It's just two sets of colons ":" next to each other to give ::

See Also



Ask questions, get help and report bugs & issues on our Community Site

View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence