Summary
A detail screen is built from the item’s content_sections array (see Content class elements reference). This article covers keys a content class can send to change how some of those sections, and the item header, are shown in the app.
All keys are optional and all values are JSON strings. A key the app does not know is ignored, so sending these keys to older app builds is safe: they show the screen as before.
Sortable section groups: sort_options
Sections that share a sort_group value are shown together under a row of chips. Each chip re-orders the group’s sections on the device. The server sends:
sort_group(string) on every section in the group.sort_keys(object) on every section in the group: the values the chips sort or filter on, for example{ "price": "12", "featured": "yes" }.sort_options(array) on the first section of the group: one entry per chip. The chip row appears only when there are at least two entries.
Each sort_options[] entry:
| Key | Values | Default | Meaning |
|---|---|---|---|
label |
string | required | Chip text. Entries without a label are skipped. |
key |
string | The sort_keys entry this chip uses. |
|
direction |
"asc" / "desc" |
"asc" |
Sort direction (sort mode only). |
mode |
"sort" / "filter" |
"sort" |
iOS 26.40.14+. See below. |
empty_text |
string | iOS 26.40.14+. Filter mode only: message shown when the filter leaves no sections. |
mode: "sort" (the default) shows every section in the group, ordered by sort_keys[key]. Values that are all numbers sort as numbers; otherwise they sort as text. Ties keep the server’s order.
mode: "filter" shows only the sections whose sort_keys[key] has a value, in the server’s order. A value that is empty, "0", "no" or "false" hides the section. If nothing is left and the chip has empty_text, that text is shown in place of the sections. If the first chip is a filter chip, it is applied when the screen opens, so the view matches the highlighted chip.
Example: an “All” chip plus a “Featured only” filter chip.
"sort_options": [
{ "label": "All", "key": "name", "direction": "asc" },
{ "label": "Featured only", "key": "featured", "mode": "filter", "empty_text": "No featured items yet." }
]
Bar graph sections: bar_graph
A section with type: "bar_graph" draws a bar chart from the keys inside its content object (labels, series, sub_title, top_right, and so on). iOS 26.40.14 adds these optional keys, also inside content:
| Key | Values | Default | Effect |
|---|---|---|---|
label_rotation |
degrees as a string, for example "-45" |
not rotated | Rotates the x-axis labels. The chart grows taller so rotated labels are not cut off. |
scrollable |
"yes" |
not set | Puts the chart in a horizontal scroll view so many bars stay readable. |
bar_min_width |
points as a string | "56" |
With scrollable, the width given to each label. The chart is never narrower than the card. |
caption |
string | A small line of text under the chart title. | |
info_text |
string | Adds an “i” button after the title. Tapping it shows this text in a dialog. | |
info_title |
string | the section title | Title of the info dialog. |
When label_rotation or scrollable is set, the chart shows one x-axis label per bar.
{
"title": "Visits by month",
"type": "bar_graph",
"show_title": "yes",
"content": {
"labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
"series": [ { "values": [4, 8, 6, 9, 12, 10, 7, 5, 9, 11, 13, 15] } ],
"label_rotation": "-45",
"scrollable": "yes",
"bar_min_width": "48",
"caption": "Last 12 months",
"info_text": "Counts each time the listing detail screen was opened."
}
}
The bar graph draws its own title inside the card. On iOS 26.40.14+ the detail screen no longer adds a second title above a bar_graph section when show_title is "yes".
Item header text: hide_main_content
The detail screen normally shows the item’s content text in a card near the top (when it is longer than 4 characters). If a content class also sends that same text as one of its content_sections (for example a “Description” section), the text appears twice.
| Key | Where | Values | Effect |
|---|---|---|---|
hide_main_content |
on the item (next to content, not inside a section) |
"yes" |
iOS 26.40.14+. The header content card is not shown. The item’s content is still sent; only that card is hidden. |
mam-special-offers 26.40.0+ sends hide_main_content: "yes" on an offer when it sends a Description section.
Gotchas
- Values are strings. Send
"yes","-45","56", not booleans or numbers. sort_optionsbelongs on the first section of the group only. Options on later sections are ignored.- Filter mode keeps the server’s order. Switching back to a sort chip shows every section again.
- Android support for these keys is pending. Android shows the screen without them.
Related articles
- Content class elements reference
- Mobile JSON shape
- Plugin: mam-special-offers
Metadata
| Field | Value |
|---|---|
| Article type | JSON Key Reference |
| Plugin slug | mam-main |
| Applies to app version | iOS 26.40.14+ (Android support pending) |
| Category | App Settings Reference |
| Audience | PHP developer |
| Last verified | 2026-10-01 |
