X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/eb5f8531fe3d9cc752a10343bb52abf8d0858196..e112b8f385992ec4b3056d397802abe092547bb5:/doc/plugins/sidebar.mdwn diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn index 7e0ad5cf6..012733456 100644 --- a/doc/plugins/sidebar.mdwn +++ b/doc/plugins/sidebar.mdwn @@ -1,21 +1,28 @@ -[[template id=plugin name=sidebar author="Tuomo Valkonen"]] -[[tag type/chrome]] +[[!template id=plugin name=sidebar author="Tuomo Valkonen"]] +[[!tag type/chrome]] -If this plugin is enabled, then a sidebar is added to pages in the wiki. -The content of the sidebar is simply the content of a page named -"sidebar" (ie, create a "sidebar.mdwn"). +This plugin allows adding a sidebar to pages in the wiki. + +By default, and unless the `global_sidebars` setting is turned off, +a sidebar is added to all pages in the wiki. The content of the sidebar +is simply the content of a page named "sidebar" (ie, create a "sidebar.mdwn"). Typically this will be a page in the root of the wiki, but it can also be a -[[SubPage]]. In fact, this page, [[plugins/sidebar|plugins/sidebar]], will -be treated as a sidebar for the [[plugins]] page, and of all of its -SubPages, if the plugin is enabled. +[[ikiwiki/SubPage]]. In fact, this page, +[[plugins/sidebar|plugins/sidebar]], will be treated as a sidebar for the +[[plugins]] page, and of all of its SubPages, if the plugin is enabled. + +There is also a [[ikiwiki/directive/sidebar]] directive that can be used +to provide a custom sidebar content for a page. + +---- -Note that to disable a sidebar for a [[SubPage]] of a page that has a sidebar, -you can create a sidebar page that is completely empty. This will turn off -the sidebar altogether. +Warning: Any change to the sidebar page will cause a rebuild of the whole +wiki, since every page includes a copy that has to be updated. This can +especially be a problem if the sidebar includes an +[[ikiwiki/directive/inline]] directive, since any changes to pages inlined +into the sidebar will change the sidebar and cause a full wiki rebuild. -Warning: Any change to the sidebar will cause a rebuild of the whole wiki, -since every page includes a copy that has to be updates. This can -especially be a problem if the sidebar includes [[inline]] or [[map]] -directives, since any changes to pages inlined or mapped onto the sidebar -will change the sidebar and cause a full wiki rebuild. +Instead, if you include a [[ikiwiki/directive/map]] directive on the sidebar, +and it does not use the `show` parameter, only adding or removing pages +included in the map will cause a full rebuild. Modifying pages will not.