Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
Multi-level numbered lists with full path?
E.g.: 2.1.6.
Avatar
kira_resari #1
Member for 2 weeks · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: Multi-level numbered lists with full path?
Hi everyone,

I want to create a multi-level numbered list where the entire "history" of parent points is displayed in each list item, like this for example:

1. Lorem ipsum
2. dolor sit amet
2.1. consetetur sadipscing elitr
2.2. sed diam nonumy eirmod
3. tempor invidunt ut labore
3.1. et dolore magna aliquyam erat
3.2. sed diam voluptua
3.2.1. At vero eos et accusam
3.2.2. et justo duo dolores
3.3. et ea rebum.

Is that even possible with DokuWiki? And if yes how?

So far, I am aware of the following CSS syntax:

div.dokuwiki ol { list-style-type: decimal; }
div.dokuwiki ol ol { list-style-type: upper-roman; }
div.dokuwiki ol ol ol { list-style-type: lower-alpha; }
div.dokuwiki ol ol ol ol { list-style-type: lower-greek; }

However, that only lets me change the characters that are used for each list level, and does nothing to display the parent levels.

Is there some way to achieve this? Any input would be greatly appreciated.

Thanks in advance,
Kira Resari
Avatar
LarsDW223 #2
Member since Sep 2014 · 257 posts
Group memberships: Members
Show profile · Link to this post
Have a look at https://stackoverflow.com/questions/4098195/can-ordered-li…
Avatar
kira_resari #3
Member for 2 weeks · 8 posts
Group memberships: Members
Show profile · Link to this post
Hi Lars,

thanks for the helpful link. I tried out a number of things in that thread (some of which produced eclectic results), and eventually found that the following arrangement worked:

ol {
  list-style-type: none;
  counter-reset: item;
  margin: 0;
  padding: 0;
}

ol > li {
  display: table;
  counter-increment: item;
  margin-bottom: 0.6em;
}

ol > li:before {
  content: counters(item, ".") ". ";
  display: table-cell;
  padding-right: 0.6em;   
}

li ol > li {
  margin: 0;
}

li ol > li:before {
  content: counters(item, ".") " ";
}

Thanks again,
Kira
=^,^=
Avatar
Aleksandr #4
Member since Mar 2010 · 511 posts · Location: Volgograd, Russia
Group memberships: Members
Show profile · Link to this post
Change format of any ordered list with the Wrap plugin.
ru: Пожалуйста, избегайте избыточного цитирования.
en: Don’t use an overquoting, please.
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: 2018-06-21, 12:05:54 (UTC +02:00)