Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Calling pagename but display within NS?
lakewa #1
Member since Feb 2007 · 2 posts · Location: Essen / Germany
Group memberships: Members
Show profile · Link to this post
Subject: Calling pagename but display within NS?
Dear forum,

I want to change the documentation/online help of a rather large Oracle/Forms application from compressed html to wiki format.

My problem is: The application knows the name of the programme it is displaying, e.g. "DC administration" and can issue a call like "http://SERVER/dokuwiki/LANGUAGE_ID/DC_administration"

But in the hierarchy it belongs to: DC/Administration/DC administration.
So the page will be sitting in the namespaces DC => Administration (basically following the application menu).
This hierarchy is unknown to the calling application

Is it possible to call only the name of a page (as above), but display it within its structure?

Thank you in advance,
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3471 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I'm not sure I understood you correctly, but why don't you build a simple forwarder? Either in PHP or using Apache's rewrite module?

Something like this could work (untested):

RewriteRule ^goto/([^/]+)/([^_]+)_(.*)$      dokuwiki/$1/$2/$3/$2_$3 [R,L]

It would redirect

http://SERVER/goto/LANGUAGE_ID/DC_administration to http://SERVER/dokuwiki/LANGUAGE_ID/DC/administration/DC_ad…
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
lakewa #3
Member since Feb 2007 · 2 posts · Location: Essen / Germany
Group memberships: Members
Show profile · Link to this post
Thanks for your fast answer...

Describing a bit more in detail.

The programme can issue something like http://SERVER/pagename (we would actually add an instance per language)

The namespaces within dokuwiki would follow our menu navigation, e.g.:
+ Main Window
   - General use of programme
   + Buying Department
      + Line Items
         - Assortments
         + Lists
            - List of Items
            - List of Sold Items

   + Distribution Centre
      + Receiving
         - Receiving Dates
         - Items Received
         + Lists
            + One off Lists
                - List One
                - List Tow

My problem (I believe) is that the page name, e.g. List One will sit in a completely different namespace than e.g. List of Items, even on a different level.

The next step - obviously is - the be able to print manuals of the entire application or only parts, e.g. Buying, or even only lists.

I think that the Rewrite rules could cover this, but I would need a rule per language and page, wouldn't I? There simply is no systematics to be used.... It doesn't even know whether it is serving the Warehouse or the Buying department.

Thanks in advance,
dibe0014 #4
User title: Ben
Member since Dec 2006 · 16 posts
Group memberships: Members
Show profile · Link to this post
Subject: Function to find the Namespace
Hi Kevin,

there is a functions that finds the namespace for a page. I have the same problem, i only have the pagename, but i need the full namespace. I my wiki, every pagename is only used once, so i could solve the problem easily:

    if(isset($_GET["code"]) && !empty($_GET["code"])) {
        $code = strtolower(ltrim($_REQUEST['code']));
        $pages = ft_pageLookup($code);
        if(count($pages)) {
            $pfad = $pages[0];
            $url = "doku.php?do=export_xhtml&id=".$pfad;
            $url = rtrim($url);
            header("Location: $url");

The function ft_pageLookup($pagename), searches if the page already exists. The function can only find the page if the page is already in the searchindex.

Maybe this might help you.

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
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-23, 15:31:04 (UTC +02:00)