is there a way to continue a list after a break ? And especially in WYSIWYG editing mode ?
what i mean is to obtain this :
TITLE
1. item
2. item
TITLE
3. item
i see this solution in css but i’m not sure how to implement it in xwiki, or even if it’s a good idea : https://stackoverflow.com/a/4615630, it implies to be able to add classes to <ol> elements.
Maybe there is an extension doing just that already ? I see this was already discussed in 2007 : [xwiki-users] numbered list
thank you for your answer !
unfortunately i knew that already, it’s not what i’m looking for, i want a dynamic way of doing it. That’s what i meant by WYSIWYG mode.
in the solution you propose, i need to manually change the start number every time i edit the list, but i’m wondering if there is a way to continue the list no matter how the number of items in the first part of the list change ?
Next weekend when i have time i will try to implement it myself, with the help of the xwiki documentation you sent
Note that in WYSIWYG mode, you can right-click on a list item and open the “Numbered List Properties” to change the start number of a list. I understand it might not be what you’re looking for, but maybe it still helps.
i have a list of scientific studies, and i want them to be numbered as a whole, but in the same time i want a clear separation by dates, so i was going with this :
2025
1- study
2- study
2024
3- study
2023
4- study
5- study
and, me and other people, can come and easily add a study in a year, without having to change the start attribute of all the other years
hi, i found a solution without using macro, but by inserting css with the XWiki.StyleSheetExtension object (inspired by the css example i gave in my first question https://stackoverflow.com/a/4615630) :
title
1. item
2. item
title
3. item
4. item
title
5. item
6. item
this works well, we can easily insert new items in wysiwyg, however i will look into the macros, as you suggested @vmassol, to get a better output : i would like to add functionalities to my list, like checking how much list items there is after a title and output the number :
title (3)
1. item
2. item
3. item
title (1)
4. item
title (2)
5. item
6. item
also i noticed an error in the css ‘compilation’ : i could not use this css : right: calc(100% + 10px); because it gets ‘compiled’ as : right: calc(100%+10px); without spaces, and neither firefox nor chrome seems to understand ‘calc’ without spaces. That’s an issue, i will open a new subject for that
Your solution has an accessibility issue. Screen readers won’t recognize your “title” as a title (which should be a heading or something like this) but will see another list item of your one(!) ordered list.