Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Multiple Templates
Avatar
barneym #1
Member since Jun 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
On this subject, I would like to extend DokuWiki so that we can use different styles.  Our end-user community needs a very simple interface (we're using Arctic, slightly modified), while our technical departments prefer the rapid navigation of a more robust interface (we're using Monobook).

The two options I see are either:

1) Modifying Wiki so that users's can select their preferred template, and store this value somewhere on a user-by-user basis.

2) Running two Wiki front ends somehow pointed at the same "data" directory (feels really dangerous to me, but Wiki might be robust enough to support this given the configurability and flatfile usage).

I need guidance on which of these is more viable, or alternatives.  And any guidance on how the solution might be approached.

Thanks!
Avatar
koko #2
Member since May 2006 · 161 posts · Location: Zonhoven Belgium
Group memberships: Members
Show profile · Link to this post
hi,

You can setup 2 wikis with 1 datadir.

So wiki1 would be the wiki as it is right now. Wiki 2 would just be the other install, but this one uses the datadir of wiki1. To get this working, You only have to change the value of datadir in config-file.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Avatar
barneym #3
Member since Jun 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
I was successful in setting up the two separate wiki homes pointed at a common data directory.  However, I have run into a case where the two templates are bleeding into each other.  Most specifically the "Monobook" template is using the link colors and some other css from the "Arctic" template.

I am going to ask about this on the Monobook site as well, in case they have info, but architecturally I am puzzled by how this could even happen.  There doesn't seem to be anything in the data directory that would impact how css is interpreted.

I am getting an error which I will address in a separate thread and this may be the source of what is going on as well.

Thanks!
Avatar
dlowery #4
Member since Jun 2006 · 1 post
Group memberships: Members
Show profile · Link to this post
barney it would have been best for you to have started a new thread for a new subject. I'm having the same problem as martin but apparently he didn't get an answer.
chi #5
Member since Jun 2006 · 1851 posts · Location: Munich Germany
Group memberships: Members, Super Mods, Wiki Managers
Show profile · Link to this post
In reply to post #3
Quote by barneym on 2006-06-25, 00:05:
I was successful in setting up the two separate wiki homes pointed at a common data directory.  However, I have run into a case where the two templates are bleeding into each other.  Most specifically the "Monobook" template is using the link colors and some other css from the "Arctic" template.

The problem is that the CSS of the templates gets cached. If you watch a wikipage with the monobook template which CSS was previously cached during it was viewed with the arctic template you have a problem. May the multitemplate [1] can help you.

[1] http://tatewake.com/wiki/projects:multitemplate_for_dokuwiki

UPDATE:
As an alternative you could modify the /lib/exe/css.php of both of your wikis and change

  1. 35      // The generated script depends on some dynamic options
  2. 36      $cache = getCacheName('styles'.$print,'.css');

to

  1. 35      // The generated script depends on some dynamic options
  2. 36      $cache = getCacheName('styles'.$conf['template'].$print,'.css');

This way the template name is used within the cache-filename and you should get the cached CSS for the template you view your pages with.

I sent a patch with this modification.

Regards
chi
Please add [SOLVED] to the initial thread subject if you feel your question has been answered.
If my answer doesn't make sense maybe your question didn't either - just visit http://facepalm.org.
This post was edited on 2006-06-28, 13:19 by chi.
Avatar
barneym #6
Member since Jun 2006 · 20 posts
Group memberships: Members
Show profile · Link to this post
Just to close this issue out...we did end up going back to a single template for other reasons.  However, your explanation uncovered a lot of confusion we had about the visual rendering of the different templates.

In the end, your updated mod to css.php is a wonderfully elegant and simple solution and we are incorporating it into our wiki until we next update.

Thanks again for all the help.

Barney
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-12-14, 09:45:13 (UTC +01:00)