名前空間

DokuWikiでは、ページをカテゴリに分けるため、“名前空間”と呼ばれるものを使用します。

名前空間の作成

名前空間を作成する手順が別に用意されているわけではありません。ページ名にコロンを付けてページを作成するだけです。最後のコロンの後ろのものがページの名前そのものになります。その他のものが名前空間です。存在しないページ名に含まれるすべての名前空間は、自動的にDokuWikiによって作成されます。

例:
example現在の名前空間にある“example”ページを参照します。
:exampleルートの名前空間にある“example”ページを参照します。
wiki:example名前空間“wiki”にある“example”ページを参照します。名前空間“wiki”は、ルートの名前空間直下にあります。
ns1:ns2:example名前空間ns2にある“example”ページを参照します。名前空間“ns2”は、名前空間ns1にあり、名前空間ns1は、ルートの名前空間直下にあります。
:ns1:ns2:example上記と同様です。
.ns1:ns2:example名前空間ns2にある“example”ページを参照します。名前空間“ns2”は、名前空間ns1にあり、名前空間ns1は、現在の名前空間の下にあります。
.ns1:ns2:名前空間ns2にある“start”ページを参照します。名前空間ns2は、名前空間ns1にあり、名前空間ns1は現在の名前空間の下にあります。

名前空間の削除

名前空間内のすべてのページが削除されたとき、名前空間は論理的に存在しなくなります。DokuWikiは通常、同様に空のディレクトリを削除します。

名前空間のリネームの仕方

PageMove pluginを使うと、古い名前空間から新しい名前空間へページを移動することができます。必要であればドキュメントを参考にしてください。

The manual way is more difficult:

For example, on a Unix host, you could:

Note that the old_namespace and/or new_namespace words may need to be encoded if they are on a non-latin character set (ie Greek, Russian etc).

However, you will still have lots of junk left around. For example in data/changes.log, various files under cache (including the .idx files etc). If possible you could just start from a blank state as follows (again under Unix) but be warned that this will mean losing all your historical information (ie recent changes):

I understand this is convoluted (and maybe I missed/messed a couple of things you should also do). All in all this is a PITA. You may also use a couple of plugins that are available for (re)building the searchindex for the complete wiki, erasing entire cache and/or old wiki revisions thus avoiding to do this manualy.

Namespace Default Linking

It is possible to link to a default file of a namespace ending the linkid with a colon: [[foo:bar:]]. To which page the link links is dependent on the existance of certain named files. For [[foo:bar:]] the following pages are checked:

foo:bar:$conf['start']
foo:bar:bar
foo:bar

The pages are checked in that order and whatever page is found first will be linked to. Autoplural linking is not done for those links

:!: This feature is only available in 2006-09-28 RC1 version and above.