Search code examples
wikidokuwiki

Automatically namespace a page in Dokuwiki


Is it possible to automatically namespace the links in a page (with the pagename), in Dokuwiki?

i.e., If I create a page [[projects]] in the global namespace, and put any further links inside it

e.g.  [[project1]], [[project2]]

these pages should automatically be under the 'projects' namespace.

Is this possible (either natively, or through a plugin) ?


Solution

  • I found a workaround which does what I was trying to achieve.

    Any link in a page, which is meant as belonging to the subject of that page, I link as follows

    [[.subject:]]
    

    This automatically makes it a link to

    current_namespace:subject:start
    

    Having changed my landing page of a namespace from 'start' to 'index', I get a behavior close to what I was looking for in the first place, i.e., a link

    [[.topic1:]] 
    

    in a page

    [[project1:index]], 
    

    will point to

    [[project1:topic1:index]]