Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
Namespace as page
Page:  1  2  next 
Avatar
elfworld #1
Member for a month · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Namespace as page
Hi.

In other wiki tools I've used, a page can have sub pages. So that when you generate a TOC, you can see it like this:

Wiki start page
  1. Photography
    1.1 Principles of photography
      1.1.1 Rule of thirds
    1.2 Practical photograpy
  2. Writing
    2.1 Writing techniques
    2.2 Litterature on writing
      2.2.1 Book tips
  3. Whatever

All of these are pages, which means that Photography is a namespace that is also a page.

Is this possible to do in DokuWiki? When I try to do it like this, the sitemap shows it like this:
1. Photography
  1.1Principels of photography
    1.1.1 Rule of thirds
  1.2 Practical photography

Where only 1.1.1 Rule of thirds and 1.2 Practical photography will be pages

To get to the pages called 1. Photography and 1.1 Princples of photography, I have to go further down in the sitemap. There they are listed, as pages, outside of the namespace hierarchy

I hope you can understand what I mean here. Is what I'm trying to do possible?
Avatar
pop #2
Member since Nov 2016 · 205 posts
Group memberships: Members
Show profile · Link to this post
Hi -

I'm not quite sure if I understand what you are trying to do. However, a few points come to my mind which might be helpful for you:

In Dokuwiki, there are no pages that are namespaces at the same time. As a matter of fact, a "namespace" is just a thinly disguised "folder" or "directory".

However, each namespace can have a special page which will be shown if you link to a namespace without naming a page as well. The name of this special page usually is "start", but you can change this in the configuration panel. Hence, if you have a namespace called ":photography" and a page ":photography:start" (and no page named ":photography"), a link to [[:photography:]] (note the trailing colon) will take you to the page :photography:start,
Avatar
schplurtz (Moderator) #3
Member since Nov 2009 · 493 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Hi.

As pop wrote, nothing in DW can be both a page and a namespace. The explanation on the default page beeing named start is correct, but it's not the entire story. things are slightly more complex. see https://www.dokuwiki.org/namespaces#namespace_default_link…

It is possible to have a page and a namespace that have the same name.

In your case, you could create these pages. namespaces are created on demand, you don't need to create them.

:photography
:photography:principles_of_photography
:photography:principles_of_photography:rule_of_thirds
:photography:practical_photograpy
:writing
:writing:writing_techniques
:writing:litterature_on_writing
:writing:litterature_on_writing:book_tips
:whatever

linking to the page [[:phography]] or to the namespace [[:photography:]] will show the same content : the page :photography

Or as suggested by pop, you could also use this :

:photography:start
:photography:principles_of_photography:start
:photography:principles_of_photography:rule_of_thirds
:photography:practical_photograpy
etc...

The subtle difference, is that linking to the page [[:photography]] will lead to "page does not exist create the page if you want".
Avatar
elfworld #4
Member for a month · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Not quite what I was looking for
Thanks guys. I appreciate it.

But it wasn't quite what I was looking for.

I tried to do the following:

I created a page called start at the top of the wiki. Then I created the following links in that start page:

[[start:photography:start|Photography]]

[[start:writing:start|Writing]]


Then I clicked on the Photography link and I was asked to create that page. Which I did. I then added the following links to that page:

[[start:photography:principles_of_photography:start|Principles of photography]]

[[start:photography:practical_photography:start|Practical photography]]

Now the sitemap looks like this:

start
  photography
    principles_of_photography
      start
    practical photography
      start
  start
  writing
start

Only the "start"s are clickable as pages. Everything else are just name spaces that can be expanded.

I have never encountered a sitemap like this before. What I would like, is for the sitemap to look like this:

start
  photogprahy
    principels of photography
    practical photography
  writing

And then each of the entries are clickable and will take you to that page.

Is this possible? Geez, this is really hard to explain in writing. Hope you understand what I mean.
Avatar
virk #5
Member since Aug 2008 · 640 posts · Location: Aachen, Germany
Group memberships: Members
Show profile · Link to this post
Some questions:
1) Why do you have "start" in the leading of each namespace? Bring everything "one level down" without the start-namespace!
2) How is the sitemap created? Do you make use of a plugin for it? We make use of the plugin indexmenu for automatic creation of the sitemap.
3) Which template are you using?
4) Is your wiki public? Can somebody have a look?

If your sitemap shall only display namespaces, think about filling it manually with a couple of links. Otherwise perhaps indexmenu or other plugins can be configured to just display namespaces.
Avatar
elfworld #6
Member for a month · 7 posts
Group memberships: Members
Show profile · Link to this post
Hi, virk.

1) Why do you have "start" in the leading of each namespace? Bring everything "one level down" without the start-namespace!

Thanks, I will do that. Maybe I misunderstood what the previous replies tried to tell me, that's why I did it. I will try your suggestion

2) How is the sitemap created? Do you make use of a plugin for it? We make use of the plugin indexmenu for automatic creation of the sitemap.

I use the standard sitemap that comes with DokuWiki. I haven't isntalled any plugin for it. Does indexmenu generate a sitemap with pages and subpages, organised in the way you want?

3) Which template are you using?

The standard template that comes out of the box with DokuWiki

4) Is your wiki public? Can somebody have a look?

It should be. As of now, it doesn't have much content, since I'm trying to learn DokuWiki. Here is the URL https://www.elfworld.org/collabwiki/doku.php

Previously I've only made wikis inside of IBM Connections (now called HCL Connections). And it was just so much easier. I didn't have to work with namespaces. You just created a page, and then you could add child pages, or sibling pages. And the sitemap was updated for each page. Easy peasy.

I have to say DokuWiki is a chore in comparison. But I appreciate you guys wanting to help me out.
Avatar
pop #7
Member since Nov 2016 · 205 posts
Group memberships: Members
Show profile · Link to this post
Quote by elfworld:
...
Previously I've only made wikis inside of IBM Connections (now called HCL Connections). And it was just so much easier. I didn't have to work with namespaces. You just created a page, and then you could add child pages, or sibling pages. And the sitemap was updated for each page. Easy peasy.

I have to say DokuWiki is a chore in comparison. But I appreciate you guys wanting to help me out.

You don't have to create namespaces in Dokuwiki, either, and Dokuwiki updates the site map quite automatically. I think that some of your confusion might come from trying to apply your HCL skills to Dokuwiki as is.

In your sample wiki, you use two links, both of which begin with "start:", i.e. you still create a namespace called "start". Is this your wish?
Avatar
elfworld #8
Member for a month · 7 posts
Group memberships: Members
Show profile · Link to this post
Quote by pop:
Quote by elfworld:
...
Previously I've only made wikis inside of IBM Connections (now called HCL Connections). And it was just so much easier. I didn't have to work with namespaces. You just created a page, and then you could add child pages, or sibling pages. And the sitemap was updated for each page. Easy peasy.

I have to say DokuWiki is a chore in comparison. But I appreciate you guys wanting to help me out.

You don't have to create namespaces in Dokuwiki, either, and Dokuwiki updates the site map quite automatically. I think that some of your confusion might come from trying to apply your HCL skills to Dokuwiki as is.

In your sample wiki, you use two links, both of which begin with "start:", i.e. you still create a namespace called "start". Is this your wish?

No, it's not what I want to do. It was just part of my confusion about this.

I want to be able to do like this:
Parent page 1
  Child 1 to page 1
    Grandchild 1 to page 1
  Child 2 to page 1
Parent page 2
  Child 1 to page 2
  Child 2 to page 2
    Grand child 1 to page 2
      Great grand child 1 to page 2
Parent page 3
etc...

And this should be reflected in the sitemap.
Avatar
virk #9
Member since Aug 2008 · 640 posts · Location: Aachen, Germany
Group memberships: Members
Show profile · Link to this post
In reply to post #7
@elfworld

@2) Indexmenu will exactly do that. I (tried to) attach a screenshot. You just configure indexmenu with one line and it automatically scans the entire wiki and provides links to "everything".

@4) Not much to be seen yet :-)

Further:
a) If you make use of indexmenu, put it in the sidebar, which you can configure in the dokuwiki-configuration. (I here in our company wiki configured indexmenu in an overlay-window, which has got the advantage that it does not require screen place; but this would be something for later in the future)

b) Carefully think about whether handling with namespaces is convenient for you or not! You can work without any namespaces and have all pages in a flat structure; this perhaps simplifies linking to each other pages but on the other hand this can create some confusion, if amount of pages gets high. I mention this topic now, because a change afterwards is a lot of work.
The author has attached one file to this post:
screenshot.png 597.9 kBytes
You have no permission to open this file.
Avatar
schplurtz (Moderator) #10
Member since Nov 2009 · 493 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
In reply to post #8
Hi,

Do you want something like this ?
Avatar
elfworld #11
Member for a month · 7 posts
Group memberships: Members
Show profile · Link to this post
Quote by schplurtz:
Hi,

Do you want something like this ?

YES! That's exactly what I want! Mind showing me how you did that? I can't seem to quite get the hang of the syntax
This post was edited on 2019-11-02, 22:52 by elfworld.
Avatar
schplurtz (Moderator) #12
Member since Nov 2009 · 493 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
I can't seem to quite get the hang of the syntax
I can understand. I mixed several solutions. (:parent, :parent:start and :parent:parent). I just reset everything to the most natural way of doing things.

First of all, create only one page named start that will be the home page of your site. :start. Never again shall you use a page named "start".
Then create a "parent" page :parent
And whenever you need, create child pages :parent:child1 :parent:child2 etc... DokuWiki automagically creates the namespace :parent.

You can think of this as : "a page becomes a namespace when needed (but still exists as a page)"
under the hood, there is a page ":parent" and a namespace ":parent:", and a page ":parent:child1"

This is exactly what I suggested in my first answer... But, unfortunately, vanilla DokuWiki does not "merge" pages and namespaces that have the same name in sitemap. So you end up with a non clickable namespace, and, a few lines below, a page with the same name. In order to "merge" pages and namespaces that have the same name, you have to add the indexmenu plugin. Thank you @virk !

Once the indexmenu plugin is installed, create a page named :indexpage. Indexmenu recommends that this page contain this :
{{indexmenu>..| navbar nocookie id#random}}
Or, if you prefer the javascript version
{{indexmenu>..| js navbar nocookie id#random}}

Then go to admin page, config settings.
In the display group, set  hidepages to ^:indexpage|sidebar|.*:sidebar
In the indexmenu plugin group set page_index   to   :indexpage

You're done.

When someone clicks on the sitemap link, (s)he gets the :indexpage instead of the default DokuWiki generated sitemap page.
Avatar
schplurtz (Moderator) #13
Member since Nov 2009 · 493 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
There is one drawback I did not anticipate. If you wan to create child page by "linking, following the link, creating", you have to use a somewhat weird syntax ".:current_page:childpage". Take a look at my rule of thirds page.

Register a user if you want to edit. Site will be gone in a few days.
This post was edited on 2019-11-03, 17:12 by schplurtz.
Avatar
elfworld #14
Member for a month · 7 posts
Group memberships: Members
Show profile · Link to this post
I think I got the hang of it now. See the image I included here. Every namespace is now clickable, and I've managed to create a nice tree structure.

[Image: http://elfworld.org/img/sitemap.png]

Two questions:

1) I see you have some nice icons in your sitemap, are those in the template you've chosen?

2) AT http://truc.schplurtz.onmypc.org/start, you've managed to get the sitemap on the start page? How do I do that? The start page of my wiki is :start and the sitemap document is called :indexpage

Really appreciate the help so far. I'm ALMOST there.

PS! Tried to register a user at your site, but never received the confirmation email.
Avatar
schplurtz (Moderator) #15
Member since Nov 2009 · 493 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
Quote by elfworld:
I think I got the hang of it now. See the image I included here. Every namespace is now clickable, and I've managed to create a nice tree structure.
Glad you made it !

Quote by elfworld:
1) I see you have some nice icons in your sitemap, are those in the template you've chosen?
These are the default Javascript icon used by the indexmenu plugin. If you want them, edit :indexpage and replace
{{indexmenu>..| navbar nocookie id#random}}
with
{{indexmenu>..| js navbar nocookie id#random}}
indexmenu has other icons. When you have time, read https://www.dokuwiki.org/plugin:indexmenu

Quote by elfworld:
2) AT http://truc.schplurtz.onmypc.org/start, you've managed to get the sitemap on the start page? How do I do that? The start page of my wiki is :start and the sitemap document is called :indexpage
I simply also added the indexmenu sitemap syntax in the main page. Take a look at the page source.

Quote by elfworld:
PS! Tried to register a user at your site, but never received the confirmation email.
I've been suspecting that laposte.net (or my strange name) is blocked by some mailhosters.
Sorry. This is another piece of evidence. (well, it could also be due to your antispam or your mailserver's )
Anyhow, your account is ready, try to log in. use your username as password. though I'm not
sure this is still useful.
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:
Page:  1  2  next 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-11-12, 05:41:59 (UTC +01:00)