List Blocks Numbering

Hi,
I’ve got this website section that mixes lengthy text with numbered notes and images. Using text blocks for the content and list blocks for the text notes, but I’m wondering if there’s a trick to stop the list counter from resetting in each Block. It’d make life easier for the client if the note numbers flowed smoothly when they’re added. (I’m trying to avoid diving into a custom plug-in :slight_smile: )

Also, is there a way to make sure the list blocks only accept ordered lists?

Any help or tips on these would be super appreciated.

Settings available nodes in the list field will be available in the upcoming Kirby 4 release. Doesn’t seem to work in a list block (yet), it seems, but I guess that’s a bug.

As regards continuing the counter instead of resetting it on each list, take a look at CSS counters:

Hey Texnixe,
Thanks for the quick response.

The numbering issue I’m facing is specific to the panel, everything’s is working in the template.

The trouble pops up because of scattered notes across multiple list blocks. When a block resets numbering in Panel, it means keeping track of the last note number or constantly checking the site to keep track.

I was hoping to tweak a CSS counter in the panel for numbering, but I couldn’t seem to find where it’s implemented.

Any tips on how to tackle this in the panel?
Appreciate your help!

Not really, don’t know if you can solve this with custom css in the panel, given that Prosemirror is at work there.

Ah, figured as much!
I’ll give a custom plugin a shot :wink:

Thanks anyway! :slight_smile:

Discovered the class I was looking for ‘::marker’.
It might not be the most elegant fix, but it got the job done!

in ‘custom-panel.css’

body {
counter-reset: notes-counter;
}

.k-list-input li {
counter-increment: notes-counter;
}

li::marker {
content: counter(notes-counter) ". ";
}

:smiley:

1 Like