Not logged in. · Lost password · Register
Forum: General Discussion Templates and Layout RSS
SAME data - two different templates. Possible?
Anders #1
Member for 3 months · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: SAME data - two different templates. Possible?
Hi all

I need to access the SAME pages with two different templates.

The reason being that I need the wiki to be accessible in two ways:
a) embedded via a frame on another site (requires minimalist layout, no excess spacing, etc) 
b) the standard way - as 'standalone' wiki on its own page (banner on top, logo, etc.)

Now, I know you can have different templates running through plugin - but as far as I understand they must reference different pages ('namespaces'). ie. there is a one-to-one relationship between pages and templates (am i right?)

Here is what I tried instead:
Making two different installations of dokuWiki in two different folders (and url's), but configured to use the same  'data' folder. This works ...or so I thought - but only at first sight.

Whenever I click an internal link on installation A - i am sent to page on installation B.
Thats is all internal links on installation A (the first installation, on top of the data folder), points to www.foo.com/wikiinstallationB/doku.php?id=fooPage when they should stay within www.foo.com/wikiinstallationA/doku.php?id=fooPage.

I have tried purging browser data, etc, no succes. Maybe it's a problem with caching at dokuWiki? I donno.. I am noob at dokuwiki, but do a little php, etc. All comments welcome.

EDIT: After further investigation I tried inserting the ~~NOCACHE~~ tag on my pages (which prevents the individual page from being cached), and it worked. It seems like the two installations somehow share the same cache. The optimal solution would be for each installation to have it OWN cache - is this possible? Less optimal solution - is there a way to prevent caching all together, so that I wont have to manual insert NOCACHE tag on each page?
I'll investigate further... any comments are welcome.


EDIT2: Problem solved (or so I think). Even though my two installations share data (pages), I managed to configure them to use separate caches, which prevents the problem outlined. In one of the installations, find the file local.php (it resides in [what_ever_the_name_of_basefolder]/conf/local.php) and just add this line
$conf['cachedir'] = 'path_to_separate_cache_folder';
This forces the installation to use the cache folder you specify, instead of the default which is in the same folder as where the installation locates its data.

(as 'path_to_separate_cache_folder', i just used the default cache folder path: './data/cache' for my installation B, since it was installation A's data folder, that was shared between the two).

Will check in again to tell if I encounter any problems with this solution.


I like dokuWiki !
 
/ Anders
This post was edited 2 times, last on 2008-02-29, 03:15 by Anders.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
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, 1.6.4, © 2003-7 by Yves Goergen
Current time: 2008-05-17, 06:30:24 (UTC +02:00)
WikiForumIRCBugsTranslate