Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
Newbie questions: namespaces, categories etc.
Avatar
JJK #1
Member since Feb 2019 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Newbie questions: namespaces, categories etc.
Hello, I just installed DokuWiki and tinkered a bit, but there are some things I just can't seem to understand.

1) As my current understanding goes, namespaces are basically folders where a page belongs; but how do I manage these namespaces? Like creating new ones, deleting them, moving a page from one to another, see all the pages for each namespace, and such?
Basically, how can I organize categories and subcategories, and pages themselves?
Also, can a page belong to two or more namespaces (so namespaces would behave like tags, rather than folders)?

2) I saw I can delete pages by simply leaving all their content empty (I don't know if this actually deletes the files or simply leave them existing and empty until the page will have some content again), but to delete a page I must have a way to navigate to it; suppose I can't remember its exact id and have removed links to it from other pages, how am I going to find it and delete?

3) How can I show all the pages of a given namespace?
Say I have the namespace "all_music" and it has the pages "Rock" and "Classical", and a ton more pages, how can I show all the links automatically (and possibly sorted in some way, like alphabetically or by creation date) without writing them all down manually, to show a page with something like:

All Music >
 - Classical
 - Rock

Also, since namespaces become all lowercase (and if I recall correctly, you can't use spaces in them), even if I write "[[All_Music:Rock]]", how could I display "all_music" as "All Music"?

4) How can I edit the id of my "start" page, if I want to call it with the name of my wiki or even simply "home"?

5) I've seen that links aren't, let's say... absolute. I mean, if I'm going to have a single "Rock" page in my whole wiki, and it'll be in the "all_music" namespace, every single time I'm going to link it on a page, I'll have to write [[all_music:Rock]], otherwise, by typing just [[Rock]], I'll create a link to a different "Rock" page within the root (or better, in the same namespace as the page I'm writing).
But you know, I (and even more so other people who may write in my wiki) can't keep track of all the namespaces for every given page; even if I have a diagram on hand or use the search, having to check every single link will disrupt the writing flow terribly. So, how can I make links "absolute" to simply write [[Rock]], and whichever page that link i into, it will link to the only existing Rock page?

6) I have installed the GoogleFonts plugin, and with added css it works, but... why does it need css, if the configuration for the plugin already has an option for the selectors (or at least the html tags) to which each font should be assigned?
Currently, I removed the tags from the configuration and only put them in the css, am I doing something wrong?

I may have many more questions, but at this moment these are the ones bugging me most.
Any help?
Thanks in advance.
This post was edited 2 times, last on 2019-02-23, 22:14 by JJK.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4646 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
A namespace, as you say, is a directory.  You can create a page by accessing it from your url. If you prepend a namespace, and if the directory does not exist, the namespace together with the page will automatically be created once the page is saved:
  http://my_domain/my_wiki/doku_php?id=new_namespace:new_page.
This will open new_page in new_namespace. You can also do this by creating a link in one of your other pages to the non-existent page, and when you click on it, the new page will be called up.  When you delete the content from the page, it is removed from the file system.  However, its metadata and history remain, so another page with the same name will inherit those.
 
How you organize is up to you.  Namespaces can have sub-namespaces, just like directories.  A page can belong only to one namespace.
There is a tag plugin, so that more than one page can be tagged with the same tag.  Clicking on a tag opens a list of all pages with that tag (see: https://www.mturner.org/fckgLite/doku.php).  As for navigating, that can be done with the sitemap and/or a sidebar holding a navigation plugin, like indexmenu.  The link tool has a search box which will find all pages with a given name whatever the namespace.

You can change the name of the start page in the Configuration Manager.  You can't make links absolute in the sense that your mean. and I can't talk about the g-fonts plugin, never looked at it.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2019-02-24, 00:17 by turnermm.
Avatar
JJK #3
Member since Feb 2019 · 7 posts
Group memberships: Members
Show profile · Link to this post
Thanks for the info.
I didn't understand the following, though:

Quote by turnermm:
The link tool has a search box which will find all pages with a given name whatever the namespace.

What did you mean? What's the link tool and where is that search box?
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4646 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Internal link button fom toolbar, top of link wizard.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
The author has attached one file to this post:
link-tools.png 95.2 kBytes
You have no permission to open this file.
Avatar
JJK #5
Member since Feb 2019 · 7 posts
Group memberships: Members
Show profile · Link to this post
Oh, I see, thanks.

So, no way to change a page's namespace, other than either moving the files manually from a directory to another or deleting the page and creating a new one within a different namespace?

Also, is there any plugin to make parts of content secret? I mean that they'd get rendered only for certain groups of users. By searching, I only found plugins that act like spoiler buttons: the content is there, just hidden, and it appears when you click. Otherwise, there is the class plugin, with which I could assign a css class like "hidden" and set it to "display: none;", but still the content would be there, a user would just need to inspect the page, find that css rule, and uncheck it to show the hidden content. I'd prefer to avoid that and have that part of content not rendered at all, if the user doesn't have the proper permission.
This post was edited on 2019-02-24, 12:45 by JJK.
Avatar
Michaelsy #6
Member since Jun 2015 · 940 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Quote by JJK:
So, no way to change a page's namespace, other than either moving the files manually from a directory to another or deleting the page and creating a new one within a different namespace?

There is a Move plugin: https://www.dokuwiki.org/plugin:move
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
Michaelsy #7
Member since Jun 2015 · 940 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
In reply to post #5
Quote by JJK:
Also, is there any plugin to make parts of content secret? I mean that they'd get rendered only for certain groups of users. By searching, I only found plugins that act like spoiler buttons: the content is there, just hidden, and it appears when you click. Otherwise, there is the class plugin, with which I could assign a css class like "hidden" and set it to "display: none;", but still the content would be there, a user would just need to inspect the page, find that css rule, and uncheck it to show the hidden content. I'd prefer to avoid that and have that part of content not rendered at all, if the user doesn't have the proper permission.

If you mean parts of pages, you can try the Include Plugin: https://www.dokuwiki.org/plugin:include#does_the_include_p…

If you mean parts of the wiki: see ACL
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited on 2019-02-24, 13:42 by Michaelsy.
Avatar
Michaelsy #8
Member since Jun 2015 · 940 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
So, how can I make links "absolute" to simply write [[Rock]], and whichever page that link i into, it will link to the only existing Rock page?

This links always to the Rock-Page in the root-namespace:
[[:Rock]]

It is the central concept of namespaces (private spaces for names) that there can not be just one page called "Rock". And for that reason, there is no addressing method that would address this one page.

Namespaces are commonly structured as hierarchies to allow reuse of names in different contexts.
Source: https://en.wikipedia.org/wiki/Namespace

I advise every beginner to be really sparing with the use of namespaces. If you only use namespaces to get a certain clarity, then you make IMHO probably a mistake. There are many more flexible ways to structure your wiki, eg. tagging. My impression is that namespaces are applied too often. This seems to be a quick fix, but it also has consequences that you should be aware of.

BTW: All normal articles/pages in a given language in Wikipedia belong to the same namespace.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited 2 times, last on 2019-02-24, 17:23 by Michaelsy.
Avatar
JJK #9
Member since Feb 2019 · 7 posts
Group memberships: Members
Show profile · Link to this post
Thanks!

Quote by Michaelsy:
I advise every beginner to be really sparing with the use of namespaces. If you only use namespaces to get a certain clarity, then you make IMHO a mistake. There are many more flexible ways to structure your wiki, eg. tagging. My impression is that namespaces are applied too often. This seems to be a quick fix, but it also has consequences that you should be aware of.

Since they are folders, I can't use them to structure as i want, so no problem there, I'll use them just for broad categories and use tags for everything else.

Quote by Michaelsy:
If you mean parts of pages, you can try the Include Plugin: https://www.dokuwiki.org/plugin:include#does_the_include_p…

If you mean parts of the wiki: see ACL

I meant parts of pages. This plugin would require me to write separate secret pages to include and I'm not sure if their content would be automatically not rendered for users lacking permissions, as the pages themselves, or if something else needs to be set, but if this is the only option, I guess I'll try.
Avatar
turnermm (Moderator) #10
Member since Oct 2009 · 4646 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
I meant parts of pages. This plugin would require me to write separate secret pages to include and I'm not sure if their content would be automatically not rendered for users lacking permissions, as the pages themselves, or if something else needs to be set, but if this is the only option, I guess I'll try.

See https://www.dokuwiki.org/plugin:include#does_the_include_p…
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Michaelsy #11
Member since Jun 2015 · 940 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
In reply to post #9
Quote by JJK:
... I'm not sure if their content would be automatically not rendered for users lacking permissions, as the pages themselves ...
Please see the link given by turnermm and me.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
JJK #12
Member since Feb 2019 · 7 posts
Group memberships: Members
Show profile · Link to this post
Another question, I'm trying to use the Pageimage plugin, which is supposed to show an image before the list entry of a page when using Pagelist, but... it's not working... the page has an image, the pagelist has the image flag, and actually, in the code of the page, an <img></img> element is created, but it's empty.
I didn't define a specific image for the page, nor did I set one in admin configs, so it should pick the first image in the page. Any idea why it doesn't?
Avatar
Michaelsy #13
Member since Jun 2015 · 940 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Quote by JJK:
Another question, ...

Please open a new thread for each new question with a meaningful subject, so that others have the chance to find the issue and the answers.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
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-06-25, 22:14:41 (UTC +02:00)