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 [2019-02-14 18:52] – For some users the sidebar does not appear Michaelsyfaq:sidebar [2024-04-02 21:14] (current) – new default template -> default template bactram
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 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 [[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]].)   * 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]].)
Line 11: Line 13:
  
 Most templates use a normal wiki [[:page]] called "sidebar" for the sidebar. Some make this configurable, so you can choose the name of the page. (E.g. since Adora Belle there is the [[config:sidebar]] config option which some templates support.) And others have several sidebars, each of which will have their own page, sometimes even depending on namespaces. Most templates use a normal wiki [[:page]] called "sidebar" for the sidebar. Some make this configurable, so you can choose the name of the page. (E.g. since Adora Belle there is the [[config:sidebar]] config option which some templates support.) And others have several sidebars, each of which will have their own page, sometimes even depending on namespaces.
 +sssss
 In the most likely event that your sidebar is a page called "sidebar", you just need to [[:page#create_a_page|create it]]. Go to ''%%http://your-wiki.com/doku.php?id=sidebar%%'', click "Create this page", edit the page, save, and you're done. That's it, your saved changes will appear in your sidebar. In the most likely event that your sidebar is a page called "sidebar", you just need to [[:page#create_a_page|create it]]. Go to ''%%http://your-wiki.com/doku.php?id=sidebar%%'', click "Create this page", edit the page, save, and you're done. That's it, your saved changes will appear in your sidebar.
  
-===== How can I have an automatic navigation in my sidebar? ===== 
- 
-Best install one of the [[plugintag>menu|plugins tagged with 'menu']] or [[plugintag>navigation|plugins tagged with 'navigation']]. 
- 
-In many cases you will also need to add the ''%%~~NOCACHE~~%%'' [[:wiki:syntax#control_macros|macro]] when using a plugin which changes the sidebar's appearance per page or namespace. 
  
 ===== My sidebar doesn't update properly or highlights the wrong parts ===== ===== My sidebar doesn't update properly or highlights the wrong parts =====
Line 24: Line 21:
 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=====
  
Line 39: Line 36:
   * '':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 ===== ===== For some users the sidebar does not appear =====
  
-The user to whom the sidebar should be displayed must have read permission on the page "sidebar".+**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.1550166725.txt.gz · Last modified: 2019-02-14 18:52 by Michaelsy

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