So, I’m writing a short snippet that runs through an array of page ids and does a ditto call for each, which I can do no problem. This is what I’m doing:
foreach ($pageArray as $pageId) {
$output .= $modx->runSnippet("Ditto",.....);
}
But what I need to do is put a letter of the alphabet in front of each of the items. So, for example, I would have for the output:
(A) First ditto result. (B) Second ditto result. (C) Third ditto result.
Anyone know how I could manage this?
(I realise that I could, a) make the output an ordered list, display it inline, and use the type attribute to approximate what I want (but the type attribute is deprecated) or b) use an ordered list, display it inline and use CSS to approximate what I want, but I think a PHP solution in the snippet would be far neater.)