Các danh mục có thể được lồng trong các danh mục khác. Dưới đây là 2 danh mục cấp cao nhất ("Core" và "Custom"), trong đó danh mục thứ hai có 2 danh mục phụ, mỗi danh mục phụ có các khối:
Xin lưu ý rằng một danh mục có thể chứa cả danh mục phụ và khối. Trong ví dụ sau, Custom có hai danh mục phụ (Move và Turn), cũng như một khối riêng (start).
JSON
{
"kind": "categoryToolbox",
"contents": [
{
"kind": "category",
"name": "Core",
"contents": [
{
"kind": "block",
"type": "controls_if"
},
{
"kind": "block",
"type": "logic_compare"
},
]
},
{
"kind": "category",
"name": "Custom",
"contents": [
{
"kind": "block",
"type": "start"
},
{
"kind": "category",
"name": "Move",
"contents": [
{
"kind": "block",
"type": "move_forward"
}
]
},
{
"kind": "category",
"name": "Turn",
"contents": [
{
"kind": "block",
"type": "turn_left"
}
]
}
]
}
]
}
XML
<xml id="toolbox" style="display: none">
<category name="Core">
<block type="controls_if"></block>
<block type="logic_compare"></block>
</category>
<category name="Custom">
<block type="start"></block>
<category name="Move">
<block type="move_forward"></block>
</category>
<category name="Turn">
<block type="turn_left"></block>
</category>
</category>
</xml>