Articles Field

Bulleted/Numbered Lists

1 year 1 month ago #86924

Pieter-Jan de Vries's Avatar Pieter-Jan de Vries

I am struggling to create bulleted/numbered lists and similar layout structures. I read the Articles Field tutorial, including the suggested instructions ( github.com/joomla/joomla-cms/pull/18571 ). But in those instructions there is only mention of a field (singular) override, meant to display a single item. That's not the place to add list opening and closing tags. So either I'm missing the obvious, or the documentation is outdated and/or incomplete.

A little help would be highly appreciated 🙂

Regards,

Pieter-Jan de Vries

1 year 1 month ago #86926

Peter van Westen's Avatar Peter van Westen Admin

1 year 1 month ago #86927

Pieter-Jan de Vries's Avatar Pieter-Jan de Vries

Like I mentioned in my initial post, I read the Articles Field tutorial, including the suggested instructions ( github.com/joomla/joomla-cms/pull/18571 ). More than once even. But for some reason I'm missing the obvious or the documentations is outdated or incomplete.

1 year 1 month ago #86929

Andrea Malalana's Avatar Andrea Malalana Moderator

The documentation is not outdated or incomplete, it's current and correct.

So maybe you're just missing something.

If you say that you followed the instructions, where did you get stuck? What are you missing?

1 year 1 month ago #86934

Pieter-Jan de Vries's Avatar Pieter-Jan de Vries

And yes, apparently I missed the obvious. The layout override is not for a single item. The

$value
variable in the override contains all the items and not just one single item.

Regards,

Pieter-Jan de Vries

1 year 1 month ago #86936

Andrea Malalana's Avatar Andrea Malalana Moderator

That's right. So you have to simply surround the main $value variable in:

<ol></ol>

And then, in the Articles Field custom HTML layout, you surround the single items with:
<li></li>

This is explained in the documentation.

1 year 1 month ago #86942

Pieter-Jan de Vries's Avatar Pieter-Jan de Vries

Yes it is and I'm sorry that I missed something and bothered you as a result of my sloppiness.

Regards,

Pieter-Jan de Vries

1 year 1 month ago #86945

Andrea Malalana's Avatar Andrea Malalana Moderator

No problem!