Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
How do I create the sidebar?
Avatar
wazoo_metoo #1
Member for 3 months · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: How do I create the sidebar?
I have installed the Material Design template.

Under Configuration, under Sidebar, it says "sidebar page name (if template supports it), empty field disables the sidebar", and the value is set to "sidebar".

In the documentation for the Material Design template...

https://www.dokuwiki.org/template:material#download_and_in…

...it says "if you wish you can now open the sidebar.php file and change its contents to your liking".  On the server, at the command line, in vim I open file lib/tpl/material/sidebar.php, but I can't make heads nor tails of it.  What would they want me to change in that file?

In the dokuwiki documentation for sidebars...

https://www.dokuwiki.org/faq:sidebar

it says to go to http://your-wiki.com/doku.php?id=sidebar and create the page.  I do that, but the resulting page appears as a normal page, it does not act as a sidebar.

What am I doing wrong?

Edit: I got it to work by editing sidebar.php like so:

//$sidebarPage = tpl_getConf('dokuwikiSidebar') == 1 ? true : false;
$sidebarPage = true;

Doesn't seem right, any help would be appreciated.

Also, what is the best way to change the logo/graphic at top left?

Edit #2: I managed to change the logo by hacking main.php, that don't seem right neither.

Edit #3:  I found the correct way to enable the sidebar.  In Configuration Settings, at the bottom, there is a section for the template, and there you can enable a flag called dokuwikiSidebar.  As far as I can tell, this is not mentioned in any of the documentation linked above.
This post was edited 3 times, last on 2019-06-16, 09:13 by wazoo_metoo.
Avatar
schplurtz (Moderator) #2
Member since Nov 2009 · 470 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Hi,

You don't need to edit any .php file. I think you missed the configuration parameters.

1) Go to admin ⚙ -> config parameters, then near the bottom of the page, you'll find the material template options. Make sure "tpl material dokuwikiSidebar" is checked and save the settings

2) create or edit a page named sidebar,  http://your-wiki.com/doku.php?id=sidebar .

3) visite any other page, your sidebar should be there.

You may revert your changes to sidebar.php, or not.


The logo.

There is no documentation about the logo, neither on DW page nor on Github. But inspection of the code shows that it will use :wiki:logo.svg or :logo.svg if they exist. So try this :
1)  revert your changes to main.php
2) Create your logo as an SVG file. Eventually, convert your jpeg or png logo to svg format
3) upload that media as :wiki:logo.svg
Avatar
schplurtz (Moderator) #3
Member since Nov 2009 · 470 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post #1
Edit #3:  I found the correct way to enable the sidebar.  In Configuration Settings, at the bottom, there is a section for the template, and there you can enable a flag called dokuwikiSidebar.  As far as I can tell, this is not mentioned in any of the documentation linked above.
I agree this (and the logo thing) should be documented, please, do not hesitate to modify https://www.dokuwiki.org/template:material , letting others benefit from your experience.
Avatar
pop #4
Member since Nov 2016 · 179 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Quote by schplurtz:
The logo.

There is no documentation about the logo, neither on DW page nor on Github.

I found this page helpful: https://www.dokuwiki.org/template:dokuwiki#changing_the_logo

I knew that the logo was documented somewhere because I had changed it in one of my wikis.
Avatar
wazoo_metoo #5
Member for 3 months · 3 posts
Group memberships: Members
Show profile · Link to this post
Many thanks to you both for getting back to me.

Quote by pop:
Quote by schplurtz:
The logo.

There is no documentation about the logo, neither on DW page nor on Github.

I found this page helpful: https://www.dokuwiki.org/template:dokuwiki#changing_the_logo

I knew that the logo was documented somewhere because I had changed it in one of my wikis.
I found that document before but it did not help because, as schplurtz mentions above, the Material template loads a different file (logo.svg not logo.png).  I can't replace logo.svg because I created my logo in GIMP which does not support vector graphics.  So in my case the only option as far as I can tell is to hack main.php.

I would say that the documentation is deficient both for the sidebar and for the logo, I will alert the authors.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-23, 15:55:08 (UTC +02:00)