sidebar: Add global_sidebars setting.
parent
37a0c2d40b
commit
1f7175e891
|
@ -20,6 +20,13 @@ sub getsetup () {
|
||||||
safe => 1,
|
safe => 1,
|
||||||
rebuild => 1,
|
rebuild => 1,
|
||||||
},
|
},
|
||||||
|
global_sidebars => {
|
||||||
|
type => "boolean",
|
||||||
|
examples => 1,
|
||||||
|
description => "show sidebar page on all pages?"
|
||||||
|
safe => 1,
|
||||||
|
rebuild => 1,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
my %pagesidebar;
|
my %pagesidebar;
|
||||||
|
@ -55,6 +62,8 @@ sub sidebar_content ($) {
|
||||||
|
|
||||||
return $pagesidebar{$page} if exists $pagesidebar{$page};
|
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_page=bestlink($page, "sidebar") || return;
|
||||||
my $sidebar_file=$pagesources{$sidebar_page} || return;
|
my $sidebar_file=$pagesources{$sidebar_page} || return;
|
||||||
my $sidebar_type=pagetype($sidebar_file);
|
my $sidebar_type=pagetype($sidebar_file);
|
||||||
|
|
|
@ -40,6 +40,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low
|
||||||
* sidebar: Now a sidebar directive can be used to override the sidebar
|
* sidebar: Now a sidebar directive can be used to override the sidebar
|
||||||
shown on a page.
|
shown on a page.
|
||||||
* Enable calendar and sidebar in auto-blog.setup.
|
* 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
|
-- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin.
|
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
|
This directive specifies a custom sidebar to display on the page,
|
||||||
of any sidebar that is displayed globally.
|
overriding any sidebar that is displayed globally.
|
||||||
|
|
||||||
## examples
|
## examples
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
[[!template id=plugin name=sidebar author="Tuomo Valkonen"]]
|
[[!template id=plugin name=sidebar author="Tuomo Valkonen"]]
|
||||||
[[!tag type/chrome]]
|
[[!tag type/chrome]]
|
||||||
|
|
||||||
If this plugin is enabled, then a sidebar is added to pages in the wiki.
|
This plugin allows adding a sidebar to pages in the wiki.
|
||||||
The content of the sidebar is simply the content of a page named
|
|
||||||
"sidebar" (ie, create a "sidebar.mdwn").
|
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
|
Typically this will be a page in the root of the wiki, but it can also be a
|
||||||
[[ikiwiki/SubPage]]. In fact, this page,
|
[[ikiwiki/SubPage]]. In fact, this page,
|
||||||
|
|
Loading…
Reference in New Issue