How to show Page tree and hide other options in Sidebar by default for all Spaces

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

By default, the space sidebar shows Child Pages and a few other options like PagesBlogCalendarsSpace Shortcut, and Space Shortcuts.

If a user or space admin want to show the Page Tree, and hide the other options, they will have to go to each space and change it manually.

ソリューション

  • We can instead use CSS to hide the links that we do not want by default
  • Use the Page Tree macro to add a Page Tree to the sidebar instead.

手順

  • To hide the other default options from the sidebar
  • Add the CSS below in the Global Stylesheet (Confluence_BaseURL)/admin/viewstylesheet.action

    .main-links-section {display: none;
    }
    .quick-links-wrapper {display: none;
    }
    .ia-secondary-container.tipsy-enabled {display: none;
    }
  • To show the Page Tree, we use the macro in the Sidebar, header, and footer section

    {pagetree:sort=natural|excerpt=true|reverse=false|startDepth=3|expandCollapseAll=true|searchBox=true}
  • The result would be something like below, for all Spaces.


We can further configure the Page Tree macro to hide the search box and the other options like sort, depth, and show or hide the expand, collapse all option.



最終更新日 2018 年 5 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.