DokuWiki

It's better when it's simple

User Tools

Site Tools


faq:sidebar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
faq:sidebar [2017-01-26 13:59] – old revision restored (2017-01-12 17:27) 141.65.129.207faq:sidebar [2023-08-15 03:42] (current) 174.172.238.244
Line 1: Line 1:
 +https://www.netproportions.com/wiki/doku.php?id=start
 +
 ====== How do I add a sidebar? ====== ====== How do I add a sidebar? ======
  
 If you're using [[template:dokuwiki|the new default template]] (or any other template which supports sidebars out of the box), you already have a sidebar functionality. If you are using a different template, there are basically two ways to add a sidebar functionality: If you're using [[template:dokuwiki|the new default template]] (or any other template which supports sidebars out of the box), you already have a sidebar functionality. If you are using a different template, there are basically two ways to add a sidebar functionality:
  
-  * Either choose a template which already comes with a sidebar, see [[http://www.dokuwiki.org/template?plugintag=sidebar|templates tagged with 'sidebar']]. (There might be some which are missing the tag, so be sure to check out all of the [[:templates]].)+  * Either choose a template which already comes with a sidebar, see [[templatetag>sidebar|templates tagged with 'sidebar']]. (There might be some which are missing the tag, so be sure to check out all of the [[:templates]].)
   * Or install a plugin which will add a sidebar to your template, see [[plugintag>sidebar|plugins tagged with 'sidebar']].   * Or install a plugin which will add a sidebar to your template, see [[plugintag>sidebar|plugins tagged with 'sidebar']].
  
-Using a template which includes a sidebar functionality is often a better choice, as that sidebar will already be optimised to fit into the template's design and layout.+Using a template which includes a sidebar functionality is often a better choice, as that sidebar will already be optimized to fit into the template's design and layout.
  
 ===== I have a sidebar functionality. How can I create or edit a sidebar now? ===== ===== I have a sidebar functionality. How can I create or edit a sidebar now? =====
Line 24: Line 26:
 If your sidebar contains dynamic elements (e.g. highlighting of the current page or opening of a sub list, like a lot of navigation plugins do), then you need to add the ''%%~~NOCACHE~~%%'' macro to your page to prevent [[:caching|caching]] of the sidebar. If your sidebar contains dynamic elements (e.g. highlighting of the current page or opening of a sub list, like a lot of navigation plugins do), then you need to add the ''%%~~NOCACHE~~%%'' macro to your page to prevent [[:caching|caching]] of the sidebar.
  
 +*This NOCACHE is no longer needed to fix link highlighting after Hogfather is released, because it has been changed in implementation to use front-end JavaScript highlighting.*
 ===== Sidebar by namespace===== ===== Sidebar by namespace=====
  
 A single sidebar is applied by default to all pages in the namespace where the wiki sidebar page is created. So, you can choose where you want to display a sidebar : A single sidebar is applied by default to all pages in the namespace where the wiki sidebar page is created. So, you can choose where you want to display a sidebar :
  
-  * '':sidebar'' - applied for all pages in the wiki by default '':*'' +  * '':sidebar'' -- applied for all pages in the wiki by default '':*'' 
-  * '':foo:sidebar'' - applied for all pages in the namespace ''foo:*''+  * '':foo:sidebar'' -- applied for all pages in the namespace ''foo:*''
  
 Moreover, you can easily have multiple sidebars: "the nearest sidebar page will be used" as said in the configuration setting: [[config:sidebar|sidebar]] page.  Moreover, you can easily have multiple sidebars: "the nearest sidebar page will be used" as said in the configuration setting: [[config:sidebar|sidebar]] page. 
Line 39: Line 41:
   * '':foo:bar:sidebar'' for the namespace '':foo:bar:*''   * '':foo:bar:sidebar'' for the namespace '':foo:bar:*''
   * '':foo:bar:baz:sidebar'' for the namespace '':foo:bar:baz:*''   * '':foo:bar:baz:sidebar'' for the namespace '':foo:bar:baz:*''
 +
 +To be clear, all you need to do is create a page named 'sidebar' in a namespace and it will apply to all pages within the namespace. 
  
 However, you have to check if your template supports this setting. Bootstrap3, and possibly other templates, extends the namespace capability to other elements of the template (rightsidebar, navbar, pageheader,....). Check the template's configuration options. However, you have to check if your template supports this setting. Bootstrap3, and possibly other templates, extends the namespace capability to other elements of the template (rightsidebar, navbar, pageheader,....). Check the template's configuration options.
 +
 +===== The contents of the sidebar remains empty =====
 +
 +You have to fill the page "sidebar" with static links and/or navigation plugin calls. In principle, the sidebar page is to edit and to fill like every other wiki page. (One small exception: be aware the ''%%~~NOCACHE~~%%'' option mentioned above.)
 +
 +===== For some users the sidebar does not appear =====
 +
 +**Q:** For some or all non-admin users the sidebar does not appear.
 +
 +**A:** The user to whom the sidebar should be displayed must have read permission on the page "sidebar".
 +
  
faq/sidebar.1485435554.txt.gz · Last modified: 2017-01-26 13:59 by 141.65.129.207

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki