safe => 1,
rebuild => 1,
},
+ global_sidebars => {
+ type => "boolean",
+ examples => 1,
+ description => "show sidebar page on all pages?"
+ safe => 1,
+ rebuild => 1,
+ },
}
my %pagesidebar;
return $pagesidebar{$page} if exists $pagesidebar{$page};
+ return if defined $config{global_sidebars} && !$config{global_sidebars};
+
my $sidebar_page=bestlink($page, "sidebar") || return;
my $sidebar_file=$pagesources{$sidebar_page} || return;
my $sidebar_type=pagetype($sidebar_file);
* sidebar: Now a sidebar directive can be used to override the sidebar
shown on a page.
* Enable calendar and sidebar in auto-blog.setup.
+ * sidebar: Add global_sidebars setting.
-- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400
The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin.
-This directive specifies a custom sidebar to display on the page, instead
-of any sidebar that is displayed globally.
+This directive specifies a custom sidebar to display on the page,
+overriding any sidebar that is displayed globally.
## examples
[[!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
[[ikiwiki/SubPage]]. In fact, this page,