Here I will develop an approach to incorporating division length texts to SC Next. When it is ready, i will incorporate it in the full MD spec.
In most cases, the texts on SC occur at the bottom of a hierarchy, eg.:
- nikaya → pannasa → vagga → sutta
Our navigation and site structure is built on this.
However there are several cases where we have so-called “division length texts”. Here we should make a full list of these, but to start:
- Miscellaneous (incl. Mahākarmavibhaṅga (Mkv))
These are texts that, for whatever reason, are not amenable to being structured as suttas. In some cases, this is an arbitrary choice, and might change. The Mkv, for example, could be split into suttas, even though these would often be quite short.
However the important cases are the patimokkhas and dhammapadas. these are central texts, and are not easily amenable into division on a sutta basis.
- In the case of the Dhammapadas, the basic entity is a verse, and this would be too short
- In the patimokkhas, the basic entity is a rule, and these are often even shorter. In extreme cases, a rule may be represented by a single Chinese character.
For this reason, we have chosen to present these on SC as one text, with the individual verses/rules linkable.
These differ from ordinary suttas in that they have an internal structure:
- patimokkha → rule type → vagga → rule
- dhammapada → vagga → verse
In SC Next we normally represent the vagga, etc. in the nav drawer. The question is, how best to handle these texts?
Let’s consider the Dhammapada first. Assume that we represent it with a single entry in the nav drawer. Click on that, and it opens the suttaplex list for that text.
This gives us a list of the verses and parallels for this text. However, there are several problems:
- We don’t have an obvious option for simply reading the Dhammapada.
- It would seem excessive to have a description for each verse.
- How do we represent the vaggas?
Here is one possible approach.
Add a distinct entry at the top of the suttaplex list, just for the Dhammapada as a whole. This is like a normal suttaplex, including a description.
Beneath that, there is the normal suttaplex list, with each verse and its parallels.
- Should we hide the full list by default, and reveal with an expander? Or display the full list by default?
Here’s the thing. The list of verses is very thin: there’s no titles to speak of, and probably no descriptions. Basically we just have an ID and a set of parallels. So we could simply hit the expander to reveal the parallels. But there are very many of them, so this would result in a huge page!
Maybe we could give the first line of the verse as the title. This would help a reader skim down the list and find the verse they’re interested in:
- Dhp 1 Manopubbangama dhamma …
- Dhp 2 Manopubbangama dhamma …
- Dhp 3 Akkocchi maṃ avadhi maṃ …
- Dhp 4 Akkocchi maṃ avadhi maṃ …
Okay, well, not so effective in the first vagga, as it happens, but anyway!
As for representing the vaggas, we could do this at it is done in suttas with sections. These are similar, in that the sections are represented with headings in the HTML file. So when the division length text was selected in the nav drawer, this would do two things:
- Call up the suttaplex list
- shift the nav drawer view “horizontally” to represent the vaggas.
In the normal suttas with sections, the nav drawer shift happens only on the text page. Here, however, it would happen on the suttaplex list (and persist on the text page).