bricks_apply_bem_component
Apply BEM component classes to Bricks page elements by mapping IDs to roles like _root, title, and price, then assign global classes. Optionally add a modifier to the root.
Instructions
Apply BEM component classes to page elements. Maps element IDs to their BEM roles (_root, title, price, cta, etc.) and assigns the corresponding global classes. Optionally adds a modifier class to the root element.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"block": "<block>",
"mapping": "<mapping>"
},
"name": "bricks_apply_bem_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block | Yes | BEM block name (must match a previously generated component) | |
| mapping | Yes | Map of Bricks element IDs to BEM element names. Use "_root" for the block element. Example: { "rt0074": "_root", "rt0075": "title", "rt0076": "price" } | |
| page_id | Yes | Page ID containing the elements | |
| modifier | No | Optional modifier to apply to the root element (e.g., "featured", "dark") |