Confluence 2.9 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
The Pagetree macro displays a dynamic, hierarchical list of pages starting from a specified parent (root) page. You can embed the page tree into your Confluence page, where it can act as a table of contents or a list of related topics.
When viewing the page tree, your reader can click a link to open the relevant page. The page's current position is highlighted in the page tree.
Below we tell you how to add the Pagetree macro to your page.
Creating a navigation panel for your space
A popular usage of the Pagetree macro is to create a navigation panel showing a table of contents for your space. Read the instructions on Adding a Navigation Sidebar.
On this page:
Using the Pagetree Macro
Include the following markup in your page:
{pagetree}
There are more examples below.
マクロ パラメーター
Below is the full list of the parameters available.
パラメーター |
Optional or Mandatory |
既定 |
説明 |
---|---|---|---|
excerpt |
任意 |
false |
Set this value to 'true' if you want the page tree to show excerpts from each page. The excerpts must be defined on each page by the Excerpt macro. |
expandCollapseAll |
任意 |
false |
Set this value to 'true' if you want to display the 'expand all' and 'collapse all' links at the top of your page tree. Your readers can click these links to open or close all branches of the tree at once. |
リバース |
任意 |
false |
Use this parameter in combination with the sort parameter described below. Set this value to 'true' if you want the pages displayed in descending order rather than ascending order. |
root |
任意 |
スペースのホームページ |
ページ ツリーの親ページを指定します。ツリーには指定されたページのすべての子と、それらの子と孫などが含まれます。ツリーには、ページ自体は含まれません。
|
searchBox |
任意 |
false |
Set this value to 'true' if you want to include a search box above the page tree. The search box allows your readers to enter a search term, and then searches within the page tree for the specified value. |
並べ替え |
任意 |
職位 |
ツリー内でのページの表示順を指定します。この並べ替えは表示目的のみです。ページの順序を永続的に再配置するものではありません。次のいずれかの値を使用できます。
|
startDepth |
任意 |
1 |
Enter any number greater than 0, indicating how many levels of children the tree should show when it opens for the first time. |
例
All Parameters
Here's an example using all the parameters:
{pagetree:root=Page Name|sort=natural|excerpt=true|reverse=false|startDepth=3|expandCollapseAll=true|searchBox=true}
Specifying the Parent Page by Name
Use the following code to specify a page name for the parent or root of the tree. The tree will include all children and grand-children of the specified root. The tree will not include the specified root page itself.
必要な入力項目 |
表示結果 |
---|---|
{pagetree:root=Pagetree Macro} |
|
The above example is a 'live' example. It uses the child pages of this page to form the page tree.
Showing All Pages in the Space
Use the following code to make the page tree show all pages in the space, including orphaned pages and the home page.
{pagetree:root=@none}
Setting the Current Page as the Parent Page
必要な入力項目 |
表示結果 |
---|---|
{pagetree:root=@self} |
|
The above example is a 'live' example. It uses the child pages of this page to form the page tree.
Showing Excerpts from Each Page
Use the following code if you want your page tree to include excerpts from each page. The excerpts must be defined on each page by the Excerpt macro.
必要な入力項目 |
表示結果 |
---|---|
{pagetree:root=@self|excerpt=true} |
|
The above example is a 'live' example. It uses the child pages of this page to form the page tree.
Allowing your Readers to Expand or Collapse All Branches
Use the following code if you want to show the 'expand all' and 'collapse all' links at the top of your page tree.
必要な入力項目 |
表示結果 |
---|---|
{pagetree:root=@self|expandCollapseAll=true} |
|
The above example is a 'live' example. It uses the child pages of this page to form the page tree.
Including a Search Box
Use the following code if you want to include a search box at the top of your page tree.
必要な入力項目 |
表示結果 |
---|---|
{pagetree:root=@self|searchBox=true} |
|
The above example is a 'live' example. It uses the child pages of this page to form the page tree.
Sorting the Pages in Reverse Natural Order
Use the following code if you want to show the pages in reverse natural order.
必要な入力項目 |
表示結果 |
---|---|
{pagetree:root=@self|sort=natural|reverse=true} |
|
The above example is a 'live' example. It uses the child pages of this page to form the page tree.
関連トピック
Pagetree Search Macro
Adding a Navigation Sidebar
Working with Macros
Take me back to Confluence User Guide